Sie sind auf Seite 1von 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 1 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Logo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. This morning you receive an e-mail from your company manager, in the e-mail, the manager asks you to create a table which is named dbo.Devices. Five rows have to be inserted into the dbo.Devices table. After this, Devised has to be returned for each of the rows. Of the following Transact-SQL batches, which one should be used? A. CREATE TABLE dbo.Widgets ( Fidgeted UNIQUEIDENTIFIER PRIMARY KEY, Widget Name VARCHAR(25) );GOINSERT dbo.Widgets (Widget Name)VALUE ('Widget One'),('Widget Two'),('Widget Three'),('Widget Four'),('Widget Five');SELECT SCOPE_IDENTITY(); B. CREATE TABLE dbo.Widgets ( Fidgeted INT IDENTITY PRIMARY KEY, Widget Name VARCHAR(25) );GOINSERT dbo.Widgets (Widget Name)VALUES ('Widget One'),('Widget Two'),('Widget Three'),('Widget Four'),('Widget Five');SELECT SCOPE_IDENTITY(); C. CREATE TABLE dbo.Widgets ( Widget UNIQUEIDENTIFIER PRIMARY KEY, Widget Name VARCHAR(25));GOINSERT dbo.Widgets (Widget Name)OUTPUT inserted.WidgetID, inserted.WidgetNameVALUES ('Widget One'),('Widget Two'),('Widget Three'),('Widget Four'),('Widget Five'); D. CREATE TABLE dbo.Widgets ( Widget INT IDENTITY PRIMARY KEY, Widget Name VARCHAR(25));GOINSERT dbo.Widgets (Widget Name)OUTPUT inserted.WidgetID, inserted.WidgetNameVALUES ('Widget One'),('Widget Two'),('Widget Three'),('Widget Four'),('Widget Five'); Answer: D Question: 2 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. The SQL Server has identified many missing indexes. Now you have to build CREATE INDEX statements for all the missing indexes. Which dynamic management view should be used? A. sys.dm_db_index_usage_stats should be used B. sys.dm_db_missing_index_group_stats should be used C. sys.dm_db_missing_index_details should be used D. sys.dm_db_missing_index_columns should be used Answer: B Question: 3 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Look at code segment below: DECLARE @Range Start INT = 0; DECLARE @Range End INT = 8000; DECLARE @Range Step INT = 1; WITH Number Range(Item Value) AS (SELECT Item Value FROM (SELECT @Range Start AS Item Value) AS t UNION ALL SELECT Item Value + @Range Step FROM Number Range
Page 1 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

WHERE Item Value < @Range End) SELECT Item Value FROM Number Range OPTION (MAXRECURSION 100) Do you know the result of executing this code segment? Which result will be returned? A. 101 rows will be returned with a maximum recursion error. B. 10,001 rows will be returned with a maximum recursion error C. 101 rows will be returned with no error D. 10,001 rows will be returned with no error Answer: A Question: 4 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There is a table named dbo.Sellings in the database. The table contains the following table definition: CREATE TABLE [dbo].[Selling]( [Selling ID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED, [Order Date] [date time] NOT NULL, [Customer] [int] NOT NULL, [SellingPersonID] [int] NULL, [Comment Date] [date] NULL); Since you notice that this query takes a long time to run, you start to examine the data. You find that only 2% of rows have comment dates and the SellingPersonID is null on 10% of the rows after the examination. So you have to improve the query performance. You have to create an index which must save disk space when optimize the query. Of the following index, which one should you choose? A. CREATE NONCLUSTERED INDEX idx2 ON dbo.Selling (Comment Date, SellingPersonID) INCLUDE(Customer)WHERE Comment Date IS NOT NULL B. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling (CustomerID)INCLUDE (CommentDate,SellingPersonID); C. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling (SellingPersonID)INCLUDE (CommentDate,CustomerID); D. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling (Customer)INCLUDE(Comment Date)WHERE SellingPersonID IS NOT NULL Answer: A Question: 5 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database which is named DB1. There is a table named Bill in DB1. BillID is the primary key of the Bill table. By using the identity property, it is populated. The Bill table and the BillLineItem are related to each other. In order to increase load speed, all constraints are removed from the Bill table during a data load. But a row with BillId = 10 was removed from the database when you removed the constraints. Therefore you have to re-insert the row into the Bill table with the same BillId value. Of the following options, which Transact-SQL statement should be used?

Page 2 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. INSERT INTO Bill(BillID, ...VALUES (10, ... B. SET IDENTITY_INSERT Billon; INSERT INTO Bill(BillID, ...VALUES (10, ...SET IDENTITY_INSERT Bill OFF; C. ALTER TABLEBill;ALTER COLUMN BillID int;INSERT INTO Bill(BillID, ...VALUES (10, ... D. ALTER DATABASE DB1SET SINGLE_USER;INSERT INTO Bill(BillID, ...VALUES (10, ...ALTER DATABASE DB1SET MULTI_USER; Answer: B Question: 6 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the company database. One table is named Sub items which includes sub items for shoes, hats and shirts. Another one is named Commodities which includes commodities only from the Sub items shoes and hats. Look at the following query: SELECT s.Name, p.Name AS Commodity Name FROM Sub items s OUTER APPLY (SELECT * FROM Commodities pr WHERE pr.SubitemID = s.SubitemID) p WHERE s.Name IS NOT NULL; Now you have to foretell what results the query produces. So what is the answer? A. Name Commodity Name---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain Bike Shoes, Shoes Racing Shoes, MShoes Racing Shoes, LHats Classic Hat, SHats Classic Hat, MHats Classic Hat, LNULL Mountain Bike Shoes, NULL Mountain Bike Shoes, NULL Racing Shoes, MNULL Racing Shoes, LNULL Classic Hat, SNULL Classic Hat, MNULL Classic Hat, LShirts NULLNULL NULL B. Name Commodity Name---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats Classic Hat, SHats Classic Hat, MHats Classic Hat, L C. Name Commodity Name---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats Classic Hat, SHats Classic Hat, MHats Classic Hat, LShirts NULL D. Name Commodity Name---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats Classic Hat, SHats ClassicHat, MHats Classic Hat, Shirts NULLNULL NULL Answer: C Question: 7 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the database of the company. The two tables are respectively named Sellings and Selling History. Historical selling data is stored in the Selling History table. On the Sellings table, you perform the configuration of Change Tracking. The minimum valid version of the Sellings table is 10. There is selling data that changed since version 10. According to the company requirement, a query has to be written to export only these data, including the primary key of deleted rows. Of the following methods, which one should be use?
Page 3 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. FROM Sellings INNER JOIN CHANGETABLE (CHANGES Sellings, 10) AS C ... B. FROM Sellings RIGHT JOIN CHANGETABLE (CHANGES Sellings, 10) AS C ... C. FROM Sellings RIGHT JOIN CHANGETABLE (CHANGES Selling History, 10) AS C ... D. FROM Sellings INNER JOIN CHANGETABLE (CHANGES Selling History, 10) AS C ... Answer: B Question: 8 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the database of the company. The two tables are respectively named Clients and Bills. Now you get an e-mail from your company manager, you've been assigned a task that you have to write a SELECT statement. The statement should output client and bill data as a valid and wellformed XML document. You have to mix attribute and element based XML within the document. But you think that it is not proper to use the FOR XML AUTO clause. You have to find the suitable FOR XML clause. Of the following FOR XML statement, which one should be used? (choose more than one) A. FOR XML PATH should be used B. FOR BROWSE should be used C. FOR XML EXPLICIT should be used D. FOR XML RAW should be used Answer: A, C Question: 9 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There's a table named Clients in the database. The Clients table contains an XML column which is named Client Info. At present the Client table contains no indexes. Look at the WHERE clause below: WHERE ClientInfo.exist ('/Client Demographic/@Age[.>="21"]') = 1 You use this clause in a query for which indexes have to be created. Of the following Transact-SQL statements, which one should be used? A. CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(Client Info);CREATE XML INDEX SXML_IDX_Client ON Client(Client Info)USING XML INDEX PXML_IDX_ClientFOR VALUE; B. CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(Client Info);CREATE XML INDEX SXML_IDX_Client ON Client(Client Info)USING XML INDEX PXML_IDX_ClientFOR PATH; C. CREATE CLUSTERED INDEX CL_IDX_Client ON Clients(Cliental);CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(Client Info);CREATE XML INDEX SXML_IDX_Client_Property ON Client(Client Info)USING XML INDEX PXML_IDX_ClientFOR VALUE; D. CREATE CLUSTERED INDEX CL_IDX_Client ON Clients(Client);CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(Client Info);CREATE XML INDEX SXML_IDX_Client ON Client(Client Info)USING XML INDEX PXML_IDX_ClientFOR PATH; Answer: D

Page 4 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 10 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the company database. The two tables are respectively named Bill and Bill Data. Bill information is stored in the two tables. The Bill table relates to the Bill Data table through the BillID column of each table. In the Bill table there is a column which is named LatestModifiedDate. If the related bill in the Bill Data table is modified, you must make sure that the LatestModifiedDate column must reflect the data and time of the modification. So you have to create a trigger. Of the following Transact-SQL statement, which one should be used? A. CREATE TRIGGER [emendate] ON [Bill]AFTER UPDATE FOR REPLICATION AS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE inserted.[BillID] = [Bill].[BillID] B. CREATE TRIGGER [uModDate] ON [Bill Details]INSTEAD OF UPDATE FOR REPLICATIONAS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE inserted.[BillID] = [Bill].[BillID]; C. CREATE TRIGGER [uModDate] ON [Bill Details] AFTER UPDATE NOT FOR REPLICATION AS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE inserted.[BillID] = [Bill].[BillID]; D. CREATE TRIGGER [uModDate] ON [Bill]INSTEAD OF UPDATE NOT FOR REPLICATIONAS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE inserted.[BillID] = [Bill].[BillID]; Answer: C Question: 11 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There's a table which is named Essays. The Essays table contains two columns respectively named Essay Head and Detail. The two columns all contain a full-text index. The word "technology" may be in column Essay Head or in column Detail. You have to return row from the Essay table. Of the following code segments, which one should be used? A. SELECT * FROM Books WHERE FREETEXT(BookTitle,'computer') B. SELECT * FROM Books WHERE FREETEXT(*,'computer') C. SELECT * FROM Books WHERE Book Title LIKE '%computer%' D. SELECT * FROM Books WHERE Book Title = '%computer%' OR Description = '%computer%' Answer: B Question: 12 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Look at the following query. SELECT Addressed, AddressLine1, City, Postal Code FROM Person. Address WHERE City = @city name AND Postal Code = @postal code
Page 5 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

You notice that for a particular set of parameter values, sometimes this query has an unstable performance, sometimes it runs quickly while sometimes it executes slowly. You also notice that in the Address table, 92 percent of the rows contain the same value for the city. You have to improve the query performance. For the particular set of parameter values, you have to identify a query hint which will optimize the query. Which query hint should be used? A. OPTIMIZE FOR should be used B. FAST should be used C. PARAMETERIZATION FORCED should be used D. MAXDOP should be used Answer: A Question: 13 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you get an order from the company manger. The company manager assigns a task to you that you have to perform the configuration on the Service Broker, making it process messages within a single database. You have completed three steps: CREATE MESSAGE TYPE; CREATE CONTRACT; CREATE QUEUE. After the above three steps, you have to complete the confifuration. So what is the next step? A. CREATE ROUTE is the next step. B. CREATE SERVICE is the next step C. CREATE ENDPOINT is the next step D. CREATE BROKER PRIORITY is the next step. Answer: B Question: 14 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. You manage a SQL Server 2008 database of the company. Now you get an e-mail from your company manager, in the e-mail, you have been assigned a task. You have to send e-mail from a stored procedure. But when you start to perform this, you notice that that a MAPI client has not been installed. In the following options, which system stored procedure should be used? A. sysmail_start_sp should be used. B. xp_sendmail should be used C. xp_startmail should be used. D. sp_send_dbmail should be used Answer: D Question: 15 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you get an email from your company, in the email, you're assigned a task. You have to configure Full-Text Search, making it ignore specific words. So of the following Full-Text Search components, which one should be used?
Page 6 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. filter should be used B. Thesaurus file should be used C. Word breakers should be used. D. Stop list should be used. Answer: D Question: 16 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There is a table which is named Item. Look at the following location: PS SQLSERVER:\SQL\CONTOSO\DEFAULT\Databases\ReportServer\Tables\dbo.Inventory\Colum ns> At this location, you use the SQL Server Windows Power Shell provider to open a Microsoft Windows Power Shell session. You have to query all the columns in Item table using the e SQL Server Windows Power Shell provider. Of the following options, which cmdlet should be used? A. Get-Child Item should be used B. Get-Item Property should be used C. Get-Item should be used D. Get-Location should be used Answer: A Question: 17 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Enterprise Edition and all the company data is stored in the SQL Server 2008 database. There's a table named Modifications. The data is the table is frequently modified. According to the company requirement, you have to maintain a history of all data modifications, the type of modification and the values modified also have to be kept. Of the following tracking methods, which one should you use? A. C2 Audit Tracing B. Change Data Capture C. Database Audit D. Change Track in Answer: B Question: 18 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. You insert the WorkerID of each Worker's manager in the Reports To column to document your company's organizational hierarchy. You have to write a recursive query. The query should produce a list of Workers and their manager and include the Worker's level in the hierarchy. You write the following code segment. (Line numbers are used for reference only.) 1 WITH Worker List (WorkerID, Full Name, Manager Name, Level) 2 AS (
Page 7 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

3 4) 5 SELECT WorkerID, Full Name, Manager Name, Level 6 FROM Worker List; At line 3, which code segment should you insert? A. SELECT WorkerID, Full Name, '' AS [ReportsTo], 1 AS [Level] FROM Worker WHERE ReportsTo IS NULL UNION ALL SELECT emp.WorkerID, emp.FullNName mgr.FullName, 1 + 1 AS [Level] FROM Worker emp JOIN Worker mgr ON emp.ReportsTo = mgr.WorkerID B. SELECT WorkerID, Full Name, '' AS [ReportsTo], 1 AS [Level] FROM Worker WHERE ReportsTo IS NULL UNION ALL SELECT emp.WorkerID, emp.FullName, mgr.FullName, mgr.Level + 1 FROM Worker List mgr JOIN Worker emp ON emp.ReportsTo = mgr.WorkerId C. SELECT WorkerID, Full Name, '' AS [Reports To], 1 AS [Level] FROM Worker UNION ALL SELECT emp.WorkerID, emp.FullName, mgr.FullName, 1 + 1 AS [Level] FROM Worker emp LEFT JOIN Worker mgr ON emp.ReportsTo = mgr.WorkerID D. SELECT WorkerID, Full Name, '' AS [ReportsTo], 1 AS [Level] FROM Worker UNION ALL SELECT emp.WorkerID, emp.FullName, mgr.FullName, mgr.Level + 1 FROM Worker List mgr JOIN Worker emp ON emp.ReportsTo = mgr.WorkerID Answer: B Question: 19 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Sales information for your company orders is stored in this database. According to the company requirement, a common table expression (CTE) has to be implemented. In the options below, which code segment should be used? A. SELECT Year, Region, Total FROM (SELECT Year, Region, SUM(Order Total) AS Total FROM Orders GROUP BY Year, Region) AS [SalesByYear]; B. SELECT DISTINCT Year, Region, (SELECT SUM(Order Total) FROM Orders SalesByYear WHERE Orders. Year = SalesByYear.YEAR AND Orders. Region = SalesByYear.Region) AS [Total] FROM Orders; C. CREATE VIEW SalesByYear AS SELECT Year, Region, SUM(Order Total) FROM Orders GROUP BY Year, Region; GO SELECT Year, Region, Total FROM SalesByYear; D. WITH SalesByYear(Year,Region,Total) AS (SELECT Year, Region, SUM(Order Total) FROM Orders GROUP BY Year, Region) SELECT Year, Region, Total FROM SalesByYear; Answer: D Question: 20 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Sales information for your company orders is stored in this database. According to the requirement for marketing analysis, your company wants you to identify the orders with the highest average unit price and an order total greater than 8,000. There should be less than 30 orders in the list. Of the follow queries, which one should you use?
Page 8 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. SELECT TOP (30) o.SalesOrderId, o.OrderDate, outtalk, SUM(od.Qty * od.UnitPrice) / SUM(od.Qty) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader o JOIN Sales.SalesOrderDetail od ON o.SalesOrderId = od.SalesOrderId WHERE outtalk> 8000 GROUP BY o.SalesOrderId, o.OrderDate, outtalk ORDER BY Total DESC; B. SELECT TOP (30) o.SalesOrderId, o.OrderDate, outtalk, (SELECT SUM(od.Qty * od.UnitPrice) / SUM(od.Qty) FROM Sales.SalesOrderDetail od WHERE o.SalesOrderId = od.SalesOrderId) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader nowhere outtalk > 8000 ORDER BY outtalk DESC, AvgUnitPrice; C. SELECT TOP (30) o.SalesOrderId, o.OrderDate, outtalk, SUM(od.QTY * od.UnitPrice) / SUM(od.Qty) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader o JOIN SALES.SalesOrderDetail od ON o.SalesOrderId = od.SalesOrderId WHERE outtalk> 8000 GROUP BY o.SalesOrderId, o.OrderDate, outtalk ORDER BY AvgUnitPrice; D. SELECT TOP (30) o.SalesOrderId, o.OrderDate, outtalk, (SELECT SUM(od.Qty * od.UnitPrice) / SUM(od.QTY) FROM Sales.SalesOrderDetail od WHERE o.SalesOrderId = od.SalesOrderId) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader o WHERE outtalk> 8000 ORDER BY AvgUnitPrice DESC; Answer: D Question: 21 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you manage a SQL Server 2008 instance. The instance is configured to use the Latin1_General_CS_AS collation. You use the statements below to create a database. CREATE DATABASE TestDB COLLATE Estonian_CS_AS; GO USE TestDB; GO CREATE TABLE TestPermTab (Primary Key int PRIMARY KEY, Col1 nchar ); You implement a temporary table named #TestTempTab that uses the following code. USE TestDB; GO CREATE TABLE #TestTempTab (Primary Key int PRIMARY KEY, Col1 nchar ); INSERT INTO #TestTempTab SELECT * FROM TestPermTab; You have to decide which collation will be assigned to #TestTempTab. In the options below, which collation will be assigned? A. Latin1_General_CS_AS B. No-collation C. Estonian_CS_AS D. The collation selected by the Windows system locale of the server Answer: A
Page 9 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 22 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Your company assigns a task to you that you have to write a query. The query returns the sequential number of a row within a partition of a result set by using a ranking function, the row starts at1 for the first row in each partition. In order to accomplish this task, which Transact-SQL statement should you use? A. You should use RANK B. You should use NTILE(10) C. You should use ROW_NUMBER D. You should use DENSE_RANK Answer: C Question: 23 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There is a table which is named Work Employee in the database. Now you get an order from your company manager, a row in the Work Employee should be deleted. You're assigned this task. A transaction should be written. The transaction should allow the database to be restored to the exact point the record was deleted but the time of execution is not needed. Of the following queries, which one should be used? A. DECLARE @Candidate Name varchar(50) = 'Delete_Candidate'BEGIN TRANSACTION @CandidateNameDELETE FROMWorkEmployee WHEREWorkEmployeeID = 10; COMMIT TRANSACTION @Candidate Name; B. BEGIN TRANSACTIONDELETE FROMWorkEmployeeWHEREWorkEmployeeID = 10;COMMIT TRANSACTION; C. BEGIN TRANSACTION WITH MARK N'Deleting a Job Candidate; DELETE FROMWorkEmployee WHEREWorkEmployeeID = 10; COMMIT TRANSACTION D. BEGIN TRANSACTION Delete Candidate WITH MARK DELETE FROMWorkEmployee WHEREWorkEmployeeID = 10; COMMIT TRANSACTION Delete Candidate; Answer: D Question: 24 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There is a table named Employee. The table contains a clustered index on EmployeeID and a nvarchar column named Family name. The Family name column has Russian and Korean characters. You will use the following code segment to search by Surname. IF @lang ='Russian' SELECT PersonID, Surname FROM Person WHERE Surname = @Search Name COLLATE Cyrillic_General_CI_AS IF @lang = 'Japanese' SELECT PersonID, Surname FROM Person
Page 10 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

WHERE Surname = @Search Name COLLATE Japanese_CI_AS_KS Now your company assigns a task to you. According to the company requirement, you have to enable SQL Server, making it perform an index seek for these queries. What action should you perform? A. An index should be created on the Surname column. B. For each collation that needs to be searched, a computed column should be created. Then on the Surname column, an index should be created C. For each collation that needs to be searched, a computed column should be created. On each computed column, an index should be created D. For each collation that needs to be searched, a new column should be created. Then you should copy the data from the Surname column. Create an index on each new column. Answer: C Question: 25 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There're two tables in the database. The two tables are respectively named Commodity Sort and CommoditySubSort. According to the company requirement, a query should be written. A list of commodity sorts which contain more than ten sub-sorts should be returned by the query. As the technical support, the company assigns this task to you. You have to write this query. In the options below, which query should be used? A. SELECT [Name] FROM Commodity Sort c WHERE EXISTS (SELECT CommoditySortID FROM CommoditySubSort WHERE CommoditySortID= c.CommoditySortID GROUP BY CommoditySortID HAVING COUNT(*) > 10) B. SELECT [Name] FROM Commodity Sort c WHERE NOT EXISTS (SELECT CommoditySortID FROM CommoditySubSort WHERE CommoditySortID= c.CommoditySortID GROUP BY CommoditySortID HAVING COUNT(*) > 10) C. SELECT [Name] FROM CommoditySubSort WHERE CommoditySortIDIN ( SELECT CommoditySortID FROM Commodity Sort) GROUP BY [Name] HAVING COUNT(*) > 10 D. SELECT [Name] FROM CommoditySubSort WHERE CommoditySortIDNOT IN (SELECT CommoditySortID FROM Commodity Sort) GROUP BY [Name] HAVING COUNT(*) > 10 Answer: A Question: 26 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There're two columns that are used to store data information by your company. The two columns are respectively named Column1 and Column2. Column1 contains the data in local time, Column2 contains the difference between local time and UTC time. According to the company requirement, this data has to be stored in a single column. As the technical support, you have to accomplish this task. Of the following data types, which one should you choose? A. datetime2(5) B. datetimeoffset
Page 11 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

C. time D. datetime2 Answer: B Question: 27 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you receive an e-mail from your company manager, in the e-mail, he wants a unique constraint to be created. As the IT engineer, you are assigned this task. So you have to create a column which allows the creation of a unique constraint. Of the following column definitions, which one can be used? (choose more than one) A. nvarchar(100) NULL B. nvarchar(100) NOT NULL C. nvarchar(max) NOT NULL D. nvarchar(100) SPARSE NULL Answer: A, B Question: 28 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There're two partitioned tables respectively named Deal and Deal Detail. Now you get an order from your company manager, according to his requirement, one of the partitions of the Transaction table has to be archived to the Transaction History table. You have to accomplish this task. In the options below, which method should be used? A. ALTER PARTITION FUNCTION ... MERGE ... B. ALTER PARTITION FUNCTION ... SPLIT ... C. ALTER TABLE ... SWITCH ... D. INSERT ... SELECT ...; TRUNCATE TABLE Answer: C Question: 29 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database which is 5 GB. There's a table named Selling Details in the database. You often perform the inserting and updating of the Selling information. Today you get a report saying that in the Selling Details table, there happens excessive page splitting. As the technical support, you must solve this problem, that is to say, you have to minimize the chance of the page splitting. In the options below, which code segment should you choose? A. EXEC sys.sp_configure 'fill factor (%)', '60'; B. ALTER INDEX ALL ON Selling.SellingHistory REBUILD WITH (FILLFACTOR = 60); C. UPDATE STATISTICS Selling.SellingHistory(Products) WITH FULLSCAN, NORECOMPUTE; D. ALTER DATABASE Selling MODIFY FILE (NAME = Sellingdat3, SIZE = 10GB); Answer: B

Page 12 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 30 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. According to the business development, you are developing a new database, which will have two tables named SallsBillItem and Goods contained. They are related to each other. Now you are assigned a task to make sure that all goods referenced in the SalesBillItem table have a corresponding record in the goods table. Which method would be used to accomplish this task? A. DDL trigger would be used to accomplish this task B. Foreign key constraint would be used to accomplish this task. C. Primary key constraint would be used to accomplish this task. D. DML trigger would be used to accomplish this task E. JOIN would be used to accomplish this task Answer: B Question: 31 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have a table named Client. Now you are assigned a task to make sure that client data in the table not only make the credit limit less than 10,000, but also make the credit limit zero when client identification has not been verified. So which constraint would you check to accomplish this task? A. ((Credulity = 0 AND Verified = 0) OR (Credulity BETWEEN 1 AND 10000 AND Verified = 1)) B. (Credulity BETWEEN 1 AND 10000) C. (Verified = 1 AND Credulity BETWEEN 1 AND 10000) D. ((Credulity = 0 AND Verified = 0) AND (Credulity BETWEEN 1 AND 10000 AND Verified = 1)) E. ((Verified = 1 AND Credulity BETWEEN 1 AND 10000) AND (Credulity BETWEEN 1 AND 10000 AND Verified = 1)) Answer: A Question: 32 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. A table that has the GPS location of clients stored is being created to meet the business needs. Now you are asked to make sure that the table allows you the following issues: 1. Calculate the distance between a client and the nearest store. 2. Identify clients within a specified sales boundary. So of the data type below, which one would be used? A. Nvarchar(max) would be used B. Virginity(max) FILESTREAM would be used. C. Algebra would be used D. Geometry would be used. Answer: D

Page 13 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 33 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have two tables respectively named Bills and Bill Items as shown as the following: From the table we can see the Bill Items is related to Bills by a foreign key that enables CASCADE DELETE. Now you are asked to have all records removed from the Bills table. Of the Transact-SQL statements below, which one would be used? A. DROP FROM Bill Items statement would be used B. DROP TABLE Bills statement would be used C. DELETE FROM Bills statement would be used D. TRUNCATE TABLE Bills statement would be used. E. DELETE FROM Bill Items statement would be used. Answer: C Question: 34 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the database. The two tables are respectively named Client and Selling Order. There are Clients who has have never made any orders and Clients who only made purchases with an Order Total less than 90. Now the company manager wants to view the list of these Clients. So you have to identify all these Clients. Of the following options, which query should be used? A. SELECT *FROM Client WHERE 100 > (SELECT MAX(Order Total) FROM Selling Order WHERE Client.ClientID = SellingsOrder.ClientID) B. SELECT *FROM Client WHERE 100 > ALL (SELECT Order Total FROM Selling Order WHERE Client.ClientID = SellingsOrder.ClientID) C. SELECT *FROM Client WHERE 100 > SOME (SELECT Order Total FROM Selling Order WHERE Client.ClientID = SellingsOrder.ClientID) D. SELECT *FROM Client WHERE EXISTS (SELECT SellingsOrder.ClientID FROM Selling Order WHERE Client.ClientID = SellingsOrder.ClientID AND SellingsOrder.OrderTotal <= 100) Answer: B Question: 35 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have two tables respectively named Clients and Bills. According to the business requirements, a list of each Client's name and number of bills should be produced for clients that have placed at least one Bill. Which query should be used to achieve this goal? A. SELECT c.ClientName, SUM(o.BillID) AS [Bill Count] FROM Clients c JOIN Bills o ON c.ClientID =
Page 14 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

o.ClientID GROUP BY c.ClientName HAVING COUNT(unbilled) > 1 B. SELECT c.ClientName, COUNT(unbilled) AS [Bill Count] FROM Clients c JOIN Bills o ON c.ClientId = o.ClientId GROUP BY c.ClientName C. SELECT c.ClientName, SUM(unbilled) AS [Bill Count] FROM Clients c JOIN Bills o ON c.ClientID = o.ClientID GROUP BY c.ClientName D. SELECT COUNT(o.BillId) AS [Bill Count] FROM CLIENTS c JOIN BILLS o ON c.CLIENTID = o.CLIENTID E: SELECT c.ClientName, COUNT(o.BillID) AS [Bill Count] FROM Clients c JOIN Bills o ON c.ClientID = o.ClientID GROUP BY c.ClientName HAVING COUNT(o.BillID) > 1 Answer: B Question: 36 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. Now you are asked to use a code segment to have the value 2.85 rounded to the nearest whole number, which code segment would you select? A. You would select ROUND (2.85, 1) B. You would select ROUND (2.85, 0) C. You would select ROUND (2.85, 2) D. You would select ROUND (2.85, 1.0) E. You would select ROUND (2.85, 2.0) Answer: B Question: 37 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. You have a table named Staff. In order to identify the supervisor that each staff reports to, you write the following query: SELECT e.StaffName AS [Staff Name], s.StaffName AS [Supervisor Name] FROM Staff e Now you are asked to make sure that a list of all staff and their respective supervisor is returned by the query. So of the following join clauses, which one would be used to complete the query? A. LEFT JOIN Staff s ON e.StaffId = s.StaffId would be used to complete the query B. INNER JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query. C. LEFT JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query D. RIGHT JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query E. INNER JOIN Staff s ON e.StaffId = s.StaffId would be used to complete the query Answer: C Question: 38 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have two tables respectively named: Sales and Sale Alters Sales SaleID 1 2 3 4
Page 15 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

SaleName SaleA SaleB Sale SaleD VendorID 0 1 1 0 Sale Alters SaleID 1 2 3 5 Sale Name SaleA SaleB SaleC SaleE VendorID 1 1 2 1 Then you execute the statement as the following: MERGE Sales USING Sale Alters ON (Sales.SaleID = SaleAlters.SaleID) WHEN MATCHED AND Sales.VendorID = A THEN DELETE WHEN MATCHED THEN UPDATE SET Sales.SaleName = SaleAlters.SaleName Sales.VendorID = SaleAlters.VendorID; In order to identify the rows that will be displayed in the Sales table, which rows do you display? A. SaleID 1 2 3 5 SaleName SaleA SaleB NewSaleC SaleE VendorID 1 1 2 1 B. SaleID 1 2 3 4 5 SaleName SaleA SaleB NewSaleC SaleD SaleE VendorID 1 1 2 0 1 C. SaleID 2 3 SaleName SaleB NewSaleC VendorID 1 2 D. SaleID 2 3 4 SaleName SaleB NewSaleC SaleD VendorID 1 2 0 Answer: D Question: 39 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have a table named Sale. According to the business requirements, the sale prices should be increased by 15 percent for only the vendor named Hope Food shop, and then a list of the sales and updated prices should be returned. So which code segment would be used to achieve this goal? A. UPDATE Sale SET Price = Price * 1.15 SALE inserted.SaleName, inserted. Price WHERE Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal B. UPDATE Sale SET Price = Price * 1.15, WHERE Sale.VendorName = ' Hope Food shop ' SALE inserted.SaleName, inserted. Price would be used to achieve this goal. C. UPDATE Sale SET Price = Price * 1.15, SaleName = SaleName WHERE Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal D. UPDATE Sale SET Price = Price * 1.15 SALE inserted.SaleName, deleted.Price WHERE Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal E. UPDATE Sale SET Price = Price * 1.15 SaleName = SaleName inserted.Price WHERE Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal. Answer: A Question: 40 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server
Page 16 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

2008 and all the company data is stored in the SQL server 2008 database. You have two tables and they are respectively named Salesman and Sales Zone. According to the business requirements, you should use a Cartesian product that contains the data from the Salesman and Sales Zone tables to create sample data. So of the following code segments, which one would be used to achieve this goal? A. SELECT p.SalesmanId, t.Name AS [Sales zone] FROM Sales. Salesman p CROSS JOIN Sales.Saleszone t would be used to achieve this goal. B. SELECT p.SalesmanId, t.Name AS [Sales zone] FROM Sales. Salesman p FULL JOIN Sales.Saleszone t ON p. SaleszoneId = t. SaleszoneId would be used to achieve this goal. C. SELECT p.SalesmanId, t.Name AS [Sales zone] FROM Sales. Salesman p INNER JOIN Sales.Saleszone t ON p. SaleszoneId = t. SaleszoneId would be used to achieve this goal. D. SELECT p.SalesmanId, t.Name AS [Sales zone] FROM Sales. Salesman p CROSS JOIN Sales.Saleszone t WHERE p. SaleszoneId = t. SaleszoneId would be used to achieve this goal Answer: A Question: 41 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have two tables and they are respectively named Clients and Bills. According to the business requirements, data of 30 days ago should be moved from Clients into Bills. Which code segment below would be used to achieve this goal? A. INSERT INTO Bill SELECT * FROM Client WHERE Record Date < DATEADD(D,30,GETDATE()) would be used to achieve this goal. B. INSERT INTO Bill SELECT * FROM Client WHERE Record Date < DATEADD(D,30,GETDATE()) DELETE FROM Client would be used to achieve this goal C. DELETE FROM Client OUTPUT deleted.* WHERE Record Date < DATEADD(D,30,GETDATE()) would be used to achieve this goal. D. DELETE FROM Client OUTPUT DELETED.* INTO Bill WHERE Record Date < DATEADD(D,-30,GETDATE()) would be used to achieve this goal Answer: D Question: 42 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You are writing a query, which returns a list of sales that have grossed more than $10,000.00 during the year 2007. Meanwhile, the filter expression of SUM ([Order Details].Unit Price * [Order Details].Quantity) > 10000 should be inserted into the query. Of the clauses below, which one should be inserted into this expression? A. WHERE clause should be inserted into this expression B. HAVING clause should be inserted into this expression C. GROUP BY clause should be inserted into this expression D. ON clause should be inserted into this expression E. WHEN clause should be inserted into this expression

Page 17 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: B Question: 43 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. The following table is named Products and the products data ordered by date of product and client name should be returned. You should give each client a list of the most recent product at the first time. So of the queries below, which one would be used? A. SELECT Client Name, Products Date FROM Products ORDER BY Client Name, Products Date DESC; B. SELECT Client Name, Products Date FROM Products ORDER BY Client Name DESC; C. SELECT Client Name, Products Date FROM Products ORDER BY Client Name DESC; Products Date; D. SELECT Client Name, Products Date FROM Products ORDER BY Client Name, Products Date; E. SELECT Client Name, Products Date FROM Products ORDER BY Products Date DESC, Client Name Answer: A Question: 44 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now with a given clause, you need to identify whether February will contain 29 days for a specified year. Which object should be used to achieve this goal? A. Table-valued function should be used to achieve this goal B. Scalar-valued function should be used to achieve this goal. C. DML trigger should be used to achieve this goal. D. DDL trigger should be used to achieve this goal E. Stored procedure should be used to achieve this goal Answer: B Question: 45 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Your company utilizes an application. The application uses stored procedures to pass XML to the database server. There are large quantities of XML handles that are currently active in the database server. Since the XML is not being cleared from SQL Server memory, you have to choose the system stored procedure to flush the XML. Of the following Transact-SQL statements, which one should be used? A. sp_reserve_http_namespace B. sp_xml_removedocument C. sp_xml_preparedocument D. sp_delete_http_namespace_reservation Answer: B

Page 18 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 46 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Data is inserted directly into a table by a third-party application. Then in order to meet the business needs, two new columns are added to the table, which cannot use default constraints or accept NULL values. So what action should you perform to make sure that the third-party application is not broken by the new columns? A. You should have a DDL trigger created B. You should have a DML trigger created. C. You should have an INSTEAD OF INSERT trigger created D. You should have an AFTER INSERT trigger created. E. You should have a stored procedure created Answer: C Question: 47 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. There is a transaction using the repeatable read isolation level. After using the repeatable read isolation level, you find it causes blocking problems frequently. Now you are assigned the following tasks: 1. Reduce blocking. 2. Avoid dirty reads. 3. Avoid non-repeatable reads. So which transaction isolation level should be used to accomplish these tasks above? A. READ COMMITTED should be used to accomplish these tasks above B. READ UNCOMMITTED should be used to accomplish these tasks above C. SNAPSHOT should be used to accomplish these tasks above. D. SERIALIZABLE should be used to accomplish these tasks above E. READ-Only COMMITTED should be used to accomplish these tasks above Answer: C Question: 48 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have many tables in your database. What action would you perform to make sure that tables are not dropped from your database? A. You should have a DML trigger that contains COMMIT created. B. You should have a DDL trigger that contains ROLLBACK created C. You should have a DML trigger that contains ROLLBACK created D. You should have a DDL trigger that contains COMMIT created E. You should have a XML trigger that contains ROLLBACK created F. You should have a XML trigger that contains COMMIT created Answer: B

Page 19 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 49 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. TRY...CATCH error handling is being used to raise an error that will pass control to the CATCH block. So of the severity level below, which one would be used? A. 0 level would be used. B. 9 level would be used C. 10 level would be used D. 16 level would be used. E. 18 level would be used Answer: D Question: 50 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now a function that references a table is being created to meet the business needs. In order to have the table prevented from being dropped, which option would be used when the function is created? A. WITH SCHEMABINDING would be used when the function is created B. WITH RETURNS NULL ON NULL INPUT would be used when the function is created C. WITH ENCRYPTION would be used when the function is created D. WITH EXECUTE AS would be used when the function is created Answer: A Question: 51 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now according to the order of your manager, a stored procedure that accepts a table-valued parameter named @Clients should be created. So of the code segments below, which one would be used? A. CREATE PROCEDURE Add Clients (@Clients Client Type OUTPUT) would be used B. CREATE PROCEDURE Add Clients (@Clients varchar(max)) would be used. C. CREATE PROCEDURE Add Clients (@Clients Client READONLY) would be used D. CREATE PROCEDURE ADDCLIENTS (@Clients varchar (max))ASEXTERNAL NAME Client.Add.NewClient would be used. Answer: C Question: 52 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. In your database, there is a single CLR assembly, which only references blessed assemblies from the Microsoft. External resources are not accessed by the NET Framework. Now you are assigned a task to deploy this assembly to meet the following needs: 1. Use the minimum required permissions. 2. Make sure the security of your database.
Page 20 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

What would you do? A. You would set PERMISSION_SET = UNSAFE TRUSTWORTHY ON B. You would set PERMISSION_SET = UNSAFE TRUSTWORTHY OFF C. You would set PERMISSION_SET = SAFE TRUSTWORTHY ON D. You would set PERMISSION_SET = SAFE TRUSTWORTHY OFF E. You would set PERMISSION_SET = EXTERNAL_ACCESS TRUSTWORTHY OFF Answer: D Question: 53 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now your manager asks you to capture the execution plan for a query. So which statement as the following would be used to achieve this goal? A. SET STATISTICS IO ON statement would be used to achieve this goal B. SET STATISTICS TIME ON statement would be used to achieve this goal C. SET FORCEPLAN ON statement would be used to achieve this goal D. SET SHOWPLAN_XML ON statement would be used to achieve this goal E. SET FORCEPLAN TIME ON statement would be used to achieve this goal Answer: D Question: 54 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. After running the database server, you find that it has a slow response to queries. In order to make the server response normally, you have the following dynamic management views (DMV) query run on the server. SELECT TOP (10) wait type, wait_time_ms FROM sys.dm_os_wait_stats ORDER BY wait_time_ms DESC; After a long time, a top wait type of SOS_SCHEDULER_YIELD was returned to the query. Now you are asked to find out the reason to cause the slow response. So what should you do first? A. First you should investigate Memory B. First you should investigate Network C. First you should investigate CPU D. First you should investigate Disk E. First you should investigate SQL Answer: C Question: 55 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now according to the order of your manager, you are analyzing a workload by using the Database Engine Tuning

Page 21 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Advisor (DTA). So of the commands below, which one would be used to save the recommendations generated by the DTA? A. The command of importing Session Definition B. The command of exporting Session Definition C. The command of importing Workload Table D. The command of exporting Workload Table E. The command of previewing Workload Table. F. The command of exporting Session Results Answer: F Question: 56 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you company appoints you to serve for a charity organization which is named Angel Plan. According to the requirement of the charity organization, they want to view the highest 100 different amounts that were donated. So you are writing a query to list the 100 amounts. You have written the code segment below. (Line numbers are used for reference only): 1 SELECT * 2 FROM (SELECT Customer.CustomerID, SUM(Total Due) AS Total Given, 3 4 FROM Customer 5 JOIN Sales Order 6 ON Customer.CustomerID = SalesOrder.CustomerID 7 GROUP BY Customer.CustomerID) AS DonationsToFilter 8 WHERE Filter Criteria <= 100 In order to complete the query, you have to insert a Transact-SQL clause in line 3 Which Transact-SQL clause should be inserted? A. ROW_NUMBER() OVER (ORDER BY SUM(Total Due) DESC) AS Filter Criteria B. DENSE_RANK() OVER (ORDER BY SUM(Total Due) DESC) AS Filter Criteria C. RANK() OVER (ORDER BY SUM(Total Due) DESC) AS Filter Criteria D. NTILE(100) OVER (ORDER BY SUM(Total Due) DESC) AS Filter Criteria Answer: D Question: 57 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Now you are assigned a task to use the Database Engine Tuning Advisor (DTA) to capture and record a workload for analysis. Of the tools below, which one would you choose? A. You would choose SQL Server Profiler B. You would choose XML utility C. You would choose Performance Monitor D. You would choose DTA utility E. You would choose Activity Monitor Answer: A

Page 22 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 58 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. According to the work requirement, SQL Server Profiler is being used to collect deadlock information. So of the following events, which one would be used to capture an XML description of a deadlock? A. Lock: Deadlock Chain would be used to capture an XML description of a deadlock B. Deadlock Graph would be used to capture an XML description of a deadlock C. Deadlock XML would be used to capture an XML description of a deadlock D. Lock: Deadlock would be used to capture an XML description of a deadlock E. Show plan XML would be used to capture an XML description of a deadlock Answer: B Question: 59 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. Goods information is contained in the XML document as the following: ECLARE @Goods List xml =' <Goods List xmlns="urn:Wide_World_Importers/schemas/Goods"> <Goods Name="Goods A" Category="clothes" Price="15.1" /> <Goods Name="GoodsB" Category="Gas" Price="3.5" /> <Goods Name="GoodsC" Category="Stationary" Price="2.1" /> ... </Goods List>'; Now your manager asks you to return a list of Goods including the following information: The Goods Name; Price of each Goods; The Category; So which query would be used to return the list? A. SELECT Goods. value('@Name','varchar(100)'), Goods. value('@Category','varchar(20)'), Goods. value('@Price, money') FROM @GoodsList.nodes('/Goods List/Goods') Goods List(Goods); B. SELECT Goods. value('Name[1]','varchar(100)'), Goods. value('Category[1]','varchar(20)'), Goods. value('Price[1]','money') FROM @GoodsList.nodes('/o:GoodsList/o:Goods') Goods List(Goods) WITH XMLNAMESPACES(DEFAULT 'urn;Wide_World_Importers/schemas/Goods' as o); C. SELECT Goods. value('./@Name','varchar(100)'), Goods. value('./@Category','varchar(20)'), Goods. value('./@Price, money') FROM @GoodsList.nodes('/Goods List/Goods') Goods List(Goods) WITH XMLNAMESPACES(DEFAULT 'urn:Wide_World_Importers/schemas/Goods'); D. SELECT Goods. value('.[1]/@Name','varchar(100)'), Goods. value('.[1]/@Category','varchar(20)'), Goods. value('.[1]/@Price, money') FROM @GoodsList.nodes('/Goods List/Goods') GoodsList(Goods); Answer: C

Page 23 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 60 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Lox go. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. According to the business needs, an XML schema must be used to validate XML data in your database. So of the following code segments, which one would be used to store this XML schema? A. CREATE XML SCHEMA COLLECTION Client Schema would be used to store this XML schema B. CREATE DEFAULT XML INDEX Client Schema would be used to store this XML schema C. CREATE SCHEMA Client Schema would be used to store this XML schema D. CREATE DEFAULT Client Schema AS 'XML' would be used to store this XML schema E. CREATE PRIMARY XML INDEX Client Schema would be used to store this XML schema. Answer: A Question: 61 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. A table named Client has an XML column named Places, which has an XML fragment with details of one or more places stored. You can see it from the following examples: <Place City="Tokyo" Address="..." Phone Number="..." /> <Place City="Ohio" Address="..." Phone Number="..." /> <Place City="Paris" Address="..." Phone Number="..." /> Now you are assigned a task to write a query that returns a row for each of the client's places to meet the following needs: Each resulting row includes an XML fragment that contains the place details. Each resulting row includes the city. Each resulting row includes the client name. So which query would be used to accomplish this task? A. You should use the query that SELECT Client Name Places. query('data(/Place/@City)'), Places. query('/Place') FROM Client B. You should use the query that SELECT Client Name, Places. query('for $i in /Place return data($i/@City)'), Places. query('for $i in /Place return $i') FROM Client. C. You should use the query that SELECT Client Name, Loc. value('@City','varchar(100)'), Loc. query('.') FROM Client CROSS APPLY Client.Places.nodes ('/Place') Locs(Loc) D. You should use the query that SELECT Client Name, Places. query('for $i in /Place return element Place {$i/@City, $i}') FROM Client Answer: C Question: 62 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL server 2008 database. You have two tables named Clients and Bills. Bills table is related to the Clients table on the ClientID by a foreign key

Page 24 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

constraint. Now according to the requirement of your manager, the XML structure that contains all clients and their related bills should be generated as the following: <Root> <Client> <Client Name>Client1</Client Name> <Bills> < Bill ><Bill Date>1/1/2008</Bill Date><Bill Value>422</Bill Value></Bill> <Bill><BillDate>4/8/2008</BillDate><BillValue>300</BillValue></Bill> ... </Bills> ... </Client> <Root> So of the following queries, which one should you choose to meet your manager??s requirement? A. SELECT Client Name, (SELECT Bill Date, Bill Value FROM Bills FOR XML PATH('Bill')) FROM Clients FOR XML PATH('Client'), ROOT('Root'), TYPE B. SELECT Client Name, (SELECT Bill Date, Bill Value FROM Bills WHERE Bills.ClientId = Clients.ClientId FOR XML PATH('Bill'), TYPE) Bills FROM Clients FOR XML PATH('Client'), ROOT('Root') C. SELECT Client Name, Bill Date, Bill Value FROM Clients c JOIN Bills o ON o.ClientID = c.ClientID FOR XML AUTO, TYPE D. SELECT * FROM (SELECT Client Name, NULL AS Bill Date, NULL AS Bill Value FROM Clients UNION ALL SELECT NULL, Bill Date, Bill Value FROM Bills) Client Bills FOR XML AUTO, ROOT('Root') Answer: B Question: 63 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. Now you are checking query performance on SQL Server 2008. According to the requirement of the company CIO, you have to use Transact-SQL to create an estimated execution plan. The plan should be able to be viewed graphically in SQL Server Management Studio. You must make sure that the execution plan can be saved as a .sqlplan file. Of the following Transact-SQL settings, which one should you use? A. SET SHOWPLAN_XML ON; B. SET SHOWPLAN_ALL ON; C. SET STATISTICS PROFILE ON; D. SET STATISTICS XML ON; Answer: A Question: 64 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There's a table which
Page 25 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

is named Commodities in the database. The Commodities table has a column which is named Shape. Now you have got an order from your company manager, according to his requirement, you have to calculate the percentage of commodities of each commodity shape. So a TransactSQL statement has to be written to perform this task. Of the following Transact-SQL statement, which one should be used? A. SELECT Shape, (COUNT(*) * 1.0)/ COUNT(*) OVER() AS PercentShapeFROM Commodities GROUP BY Shape; B. SELECT Shape COUNT(*) * 1.0) / COUNT(*) OVER(PARTITION BY Shape) AS PercentShapeFROM Commodities GROUP BY Shape; C. SELECT Shape COUNT(*) OVER(PARTITION BY Shape) / (COUNT(*) * 1.0) AS PercentShapeFROM Commodities GROUP BY Shape; D. SELECT Shape COUNT(*) OVER() / (COUNT(*) * 1.0) AS Percent Shape / (COUNT(*) * 1.0) AS PercentShapeFROM Commodities GROUP BY Shape; Answer: A Question: 65 You are a database developer and you have many years experience in database development. Now you are employed in a company which is named Loxgo. The company uses SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There are two tables in the database. The two tables are respectively named Selling.SellingOrderTittle and People. People. Now you get an e-mail from your company, in the e-mail, you have been assigned a task that you have to write a query. The query should return SellingsOrderID and SellingsPeopleName that have an Order Date greater than 20040101. SellingsPeopleName should be made up by concatenating the columns named First Name and Last Name from the table named People. People. A query should be written to return data which is sorted in alphabetical order, by the concatenation of First Name and Last Name. Of the following Transact-SQL statements, which one should be used? A. SELECT SellingsOrderID, First Name +' ' + Last Name as SellingsPeopleNameFROM Sellings.SellingsOrderHeader HJOIN People. People P on P.BusinessEntityID = H.SellingsPeopleIDWHERE Order Date > '20040101'ORDER BY SellingsPeopleName ASC B. SELECT SellingsOrderID, First Name + ' ' + Last Name as SellingsPeopleName FROM Sellings.SellingsOrderHeader HJOIN People. People P on P.BusinessEntityID = H.SellingsPeopleIDWHERE Order Date > '20040101'ORDER BY SellingsPeopleName DESC C. SELECT SellingsOrderID, First Name + ' ' + Last Name as SellingsPeopleName FROM Sellings.SellingsOrderHeader HJOIN People. People P on P.BusinessEntityID = H.SellingsPeopleIDWHERE Order Date > '20040101'ORDER BY First Name ASC, Last Name ASC D. SELECT SellingsOrderID, First Name + ' ' + Last Name as SellingsPeopleName FROM Sellings.SellingsOrderHeader HJOIN People. People P on P.BusinessEntityID = H.SellingsPeopleIDWHERE Order Date > '20040101'ORDER BY First Name DESC, Last Name DESC Answer: A Question: 66 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution.
Page 26 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day Compnay.com asks you how long you have been using and configuring any version of Microsoft sql server. What should your reply be? A. you should inform Compnay.com that you have 3-8 months experience. B. you should inform Compnay.com that you have no experience. C. you should inform Compnay.com that you have 1 year experience. D. you should inform Compnay.com that you have 3-4 years experience. Answer: B Question: 67 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named product and was deleted. during the course of the day you receive instruction from Compnay.com to prevent products from being deleted if the products belong to kit by ensuring that the delete does not occur and the was deleted column for the row should be changed to 'true'. you later decided to write the transact-sql trigger shown below: update p set was deleted = 1 from product part pp join deleted d on pp.productid = d.productid join part p on pp.productid = p.productid; delete from p from part p join deleted d on p.productid = d.productid left outer join product part pp on p.productid = pp.productid where pp.productid is null; What should you do? A. you should consider making use of the trigger statement below: create trigger tr_productpart_d on product part instead of delete as begin ... end B. you should consider making use of the trigger statement below: create trigger tr_product_d on product instead of delete as begin ... end C. you should consider making use of the trigger statement below: create trigger tr_productpart_d on product part after delete as begin ... end D. you should consider making use of the trigger statement below: create trigger tr_product_d on product after delete as begin ...
Page 27 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

end Answer: B Question: 68 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which is accessed using an application with windows authentication by customers around the world. during the course of the day you receive instruction from Compnay.com to ensure that the system and user-defined error messages are displayed in the localized language of the customers around the world. What should you do? (choose two) A. you should consider making use of the "set language" option of sp_configure. B. you should consider making use of the default language for each login. C. you should consider making use of the @lang parameter of sp_addmessage. D. you should consider making use of the @@language function. Answer: B, C Question: 69 You work as a network database administrator at Compnay.com in London. The Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing a table named new.product.development which contains a column named e-address. during the course of the day you receive instruction from Compnay.com to have a transact-sql stamen written to create a report which returns valid ".com" e-mail addresses which has a minimum of one character before the @ sign, one character after the @ sign and before the ".com" from the new.product.development table. What should you do? A. you should consider making use of the transact-sql statement below: select * from new.product.development where e-address like '_%@_%.com' B. you should consider making use of the transact-sql statement below: select * from new.product.development where e-address like '%@%.com' C. you should consider making use of the transact-sql statement below: select * from new.product.development where e-address like '%@%[.]com' D. you should consider making use of the transact-sql statement below: select * from new.product.development where e-address like '_%@_.com' Answer: A Question: 70 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you are approached by the management team and asked what your level of experience is developing databases making use of Microsoft sql server 2008. What would your reply be?

Page 28 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. you should inform Compnay.com that you have not done before. B. you should inform Compnay.com that you have less than 6 months experience. C. you should inform Compnay.com that you have1-2 years experience. D. you should inform Compnay.com that you have 3-6 months experience. E. you should inform Compnay.com that you have 3-4 years experience. Answer: A Question: 71 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named dbo.inventory. during the course of the day you receive instruction from Compnay.com to have different views developed to view the dbo.inventory table used by a specific region named king region to update, insert and delete rows whilst ensuring the specific region are only able to insert, delete and update rows in their specific region. What should you do? A. you should consider making use of the code segment below to create the view: create view dbo.kingregioninventory as select inventoryid,orderqty,salespersonid,kingregionid from dbo.inventory where kingregionid = 1 with check option; B. you should consider making use of the code segment below to create the view: create view dbo.kingregioninventory with view metadata as select inventoryid,orderqty,salespersonid,kingregionid from dbo.inventory where kingregionid = 1; C. you should consider making use of the code segment below to create the view: create view dbo.kingregioninventory as select inventoryid,orderqty,salespersonid,kingregionid from dbo.inventory where kingregionid = 1; D. you should consider making use of the code segment below to create the view: create view dbo.kingregioninventory with schema binding as select inventoryid,orderqty,salespersonid,kingregionid from dbo.inventory where kingregionid = 1; Answer: A Question: 72 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which has a transaction which uses the repeatable read isolation level which causes blocking problems. during the course of the day you receive instruction from Compnay.com to have the blocking reduced whilst ensuring that you avoid dirty reads and non-repeatable reads.
Page 29 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

What should you do? A. you should consider making use of the read uncommitted transaction isolation level. B. you should consider making use of the read committed transaction isolation level. C. you should consider making use of the snapshot transaction isolation level. D. you should consider making use of the fertilizable transaction isolation level. Answer: C Question: 73 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to have the blocking behavior analyzed for the query below: set transaction isolation level fertilizable with clients as ( select * from clients ), sales total as ( select cliental, sum(order total) as allordertotal from inventory order) select cliental, allordertotal from inventory total where allordertotal > 10000.00; Compnay.com has additionally requested that you verify whether other queries using the clients table would be blocked by the query whilst ensuring if the query will be blocked by other queries using the inventory table. What would the result be? A. the result of the analyzing would have the other queries blocked by this query. the result of the analyzing would not have the query blocked by the other queries. B. the result of the analyzing would not have the other queries blocked by this query. the result of the analyzing would not have the query blocked by the other queries. C. the result of the analyzing would not have the other queries blocked by this query. the result of the analyzing would have the query blocked by the other queries. D. the result of the analyzing would have the other queries blocked by this query. the result of the analyzing would have the query blocked by the other queries. Answer: B Question: 74 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to troubleshoot query performance on -sr01. you later decided to have the profiler trace data in a table named perfdatA. Compnay.com has additionally requested that you determine which events take longer that one seconds of cpu time to run for more than two seconds. What should you do? A. you should consider making use of the transact-sql statement: select text data, duration, cpu from per data where event class = 12 and
Page 30 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

( cpu > 1000000 or duration > 2000 ) B. you should consider making use of the transact-sql statement: select text data, duration, cpu from per data where event class = 12 and ( cpu > 1000 or duration > 2000 ) C. you should consider making use of the transact-sql statement: select text data, duration, cpu from predate where event class = 12 and ( cpu > 1000000 or duration > 2000000 ) D. you should consider making use of the transact-sql statement: select text data, duration, cpu from per data where event class = 12 and ( cpu > 1000 or duration > 2000000 ) Answer: D Question: 75 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing the product table. during the course of the day you receive instruction from Compnay.com to have the product data returned ordered by the vendor name and date of product release whilst ensuring the vendors latest release is listed first. what should you do? A. you should consider making use of the query below: select vendor name, product date from products order by vendor name desc; B. you should consider making use of the query below: select vendor name, product date from products order by vendor name, product date; C. you should consider making use of the query below: select vendor name, product date from products order by vendor name, product date desc; D. you should consider making use of the query below: select vendor name, product date from products order by product date desc, vendor name;

Page 31 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: C Question: 76 You work as a network database administrator at Compnay.com in London. The Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named product and orders. during the course of the day you receive instruction from Compnay.com to have a list produced which would return the product name and order quantity for consumers placing at least one order. What should you do? A. you should consider making use of the query below: select c.productname, count(o.productid) as [order count] from product c join orders o on c.productid = o.productid group by c.productname B. you should consider making use of the query below: select c.productname, sum(unordered) as [order count] from product c join orders o on c.productid = o.productid group by c.productname C. you should consider making use of the query below: select count(unordered) as [order count] from product c join orders o on c.productid = o.productid D. you should consider making use of the query below: select c.productname, count(unordered) as [order count] from product c join orders o on c.productid = o.productid group by c.productname having count(unordered) > 1 Answer: A Question: 77 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named products containing the column named king color. during the course of the day you receive instruction from Compnay.com to have a transact-sql statement written which would calculate the percentage of products of each color for a company named wetland industries. What should you do? A. you should consider making use of the transact-sql statement below: select color count(*) over() / (count(*) * 1.0) as percent color / (count(*) * 1.0) as percent color
Page 32 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

from products group by color; B. you should consider making use of the transact-sql statement below: select color count(*) over(partition by color) / (count(*) * 1.0) as percent color from products group by color; C. you should consider making use of the transact-sql statement below: select color count(*) * 1.0) / count(*) over(partition by color) as percent color from products group by color; D. you should consider making use of the transact-sql statement below: select color, (count(*) * 1.0)/ count(*) over() as percent color from products group by color; Answer: D Question: 78 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which has an inventory table with a full-text catalog and contains the product name and description columns. Compnay.com has additionally used a full-text thesaurus to expand common product terms. during the course of the day you receive instruction from Compnay.com to have a full-text query developed which will match only the exact word in the search as well as the meaning. What should you do? A. you should consider making use of the transact-sql statement below: select * from inventory where description like '%product%' B. you should consider making use of the transact-sql statement below: select * from inventory where free text (*, 'product')) C. you should consider making use of the transact-sql statement below: select * from inventory where contains (*, 'forms of(inflectional, product)') D. you should consider making use of the transact-sql statement below: select * from inventory where contains (*, 'product') Answer: B Question: 79 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to create a batch containing multiple update statements modifying existing inventory which will be placed into an explicit transaction. Compnay.com has additionally requested that you set the option at the beginning of the transaction to roll back all changes when updates in the transaction fail. What should you do?
Page 33 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. you should consider having the remote_proc_transactions option enabled. B. you should consider having the implicit transactions option enabled. C. you should consider having the arithabort option enabled. D. you should consider having the xact_abort option enabled. Answer: D Question: 80 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which is used to store vendor product prices. during the course of the day you receive instruction from Compnay.com to have the listed prices increased by 35.00 for the vendor wetland industries. What should you do? A. you should consider making use of the query below: update inventory. product set list price = list price + 35.00 where vend rid in (select vendor from purchasing. vendor where vendor name = 'wetland industries'); B. you should consider making use of the query below: update inventory. product set list price = list price + 35.00 where vend rid not in (select vend rid from purchasing. vendor); where vendor name = 'wetland industries'); C. you should consider making use of the query below: update inventory. product set list price = list price + 35.00 where exists (select vend rid from purchasing. vendor where vendor name = 'wetland industries'); D. you should consider making use of the query below: update inventory. product set list price = list price + 35.00 where not exists (select vend rid from purchasing. vendor); where vendor name = 'wetland industries'); Answer: A Question: 81 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. Compnay.com additionally created a full-text catalog named king catalog which contains the kin inventory index on the product table. during the course of the day Compnay.com decided to insert a couple of new products into the inventory table. during your maintenance you discovered that only some of the added products are included in the results of the full-text searches. you additionally verified that the row does indeed exist in the products table. Compnay.com now wants you to have the full-text catalog updated ensuring the least amount of administrative time is spent.
Page 34 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

What should you do? A. you should consider making use of the transact-sql statement below: alter full text catalog king catalog rebuild B. you should consider making use of the transact-sql statement below: alter full text index on king inventory start update population C. you should consider making use of the transact-sql statement below: alter full text index on king inventory resume population D. you should consider making use of the transact-sql statement below: alter full text index on king inventory start full population Answer: B Question: 82 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named dbo.products. during the course of the day you receive instruction from Compnay.com to have five rows inserted into the dob.products table whilst ensuring that the predicted returned for each of the rows have been inserted. What should you do? A. you should consider using the column definition below: create table dbo.products ( predicted unique identifier primary key, product name varchar(25) ); go insert dbo.products (product name) values ('product one'),('product two'),('product three'),('product four'),('product five'); select scope identity(); B. you should consider using the column definition below: create table dbo.products ( predicted unique identifier primary key, product name varchar(25)); go insert dbo.products (product name) output inserted.productid, inserted.productname values ('product one'),('product two'),('product three'),('product four'),('product five'); C. you should consider using the column definition below: create table dbo.products ( predicted int identity primary key, product name varchar(25) ); go insert dbo.products (product name) values (product one'),('product two'),('product three'),('product four'),('productive'); select scope identity(); D. you should consider using the column definition below: create table dbo.products ( predicted int identity primary key,
Page 35 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

product name varchar(25)); go insert dbo.products (product name) output inserted.productid, inserted.productname values ('product one'),('product two'),('product three'),('product four'),('productive'); C. create table dbo.products ( Answer: D Question: 83 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables named dbo.products and dbo.prices. Compnay.com is aware that the dbo.products table contains ten products of which five are priced at $35 and have a price increase set to $1 and the other five products are priced at $10 and remains so. during the course of the day you received instruction from Compnay.com to develop a query. you decided to start writing the query as shown below: insert dbo.prices (predicted, change, change date) select predicted, in prices - deprives, sysdatetime() from ( update dbo.products set price *= 1.1 output inserted.productid, inserted. prices, deleted. prices where price increase = 1 ) p (predicted, in prices, delprices); Compnay.com wants to know what the result would be from running the query that was written? A. the query written would have no rows updated in dbo.products and five rows inserted into dbo.prices. B. the query written would have no rows updated in dbo.products and no rows inserted into dbo.prices. C. the query written would have five rows updated in dbo.products and no rows inserted into dbo.prices. D. the query written would have five rows updated in dbo.products and five rows inserted into dbo.prices. Answer: D Question: 84 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing two tables which you populated using the transact-sql statements shown below:

Page 36 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

create table current customers (last name varchar(50), first name varchar(50), address varchar(100), age int); insert into current customers values ('ricardo', 'davids', '1881 kline street', 14) ,('paul', reeve' , '4829 south union', 14) ,('brown', 'cake' , '5881 Washington ave',14) ,('smith', 'john' , '184 water st', 14) ,('holy', 'mary' , '888 mass ct', 14) ,('robin', 'Jenkins' , '4889 union ave', 14) ,('chritiano', 'frank' , 85812 meadow st', 14) ,('bee', 'cathy' , '18829 sky-high ave', 14) ,('Franklin', 'Thomas' , '18801 120th st', 14) create table newcustomerroster(last name varchar(50), first name varchar(50), address varchar(100), age int); insert into newcustomerroster values ('ricardo', 'davids', '1881 Kline street', 15) ,('paul', 'reevers', '1980 Grandview place', 15) ,('smith', 'wilbur', '4831 w. 93rd', 15) ,('chucky', 'norris', '1008 1st ave', 15) ,('thomas', 'holystone', '18876 sound view dr', 15) ,('lester', 'danielle', '8941 w. 37 ave', 15) ,('tree', 'joshua', '2811 10st ave', 15) ,('dark', 'lovely', '1887 fifth ave', 15) ,('holy', 'marin', '1802 w. 303rd', 15) ,('dean', 'waltz', '100o 12st st', 15); During the course of the day you receive instruction from Compnay.com to run a merge statement which updates, inserts and deletes rows in the current customer table as shown below: merge top (3) current customers as t using newcustomerroster as s on s.lastname = t.lastname and s.firstname = t.firstname when matched and not (t.age = s.age or t.address = s.address) then update set address = swaddles, age = s.age when not matched by target then insert (last name, first name, address, age) values (s.lastname, s.firstname, s.address, s.age) when not matched by source then delete; Compnay.com has additionally requested that you identify the number of rows which are updated, inserted and deleted in the current customer table. What should you do? A. the merge statement used would have a total of 3 rows. B. the merge statement used would have a total of 6 rows. C. the merge statement used would have a total of 9 rows. D. the merge statement used would have a total of 0 rows. Answer: A Question: 85 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution.
Page 37 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

company.com currently makes use of a database server named-db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have create index statements build for the missing indexes identified by -db01. what should you do? A. you should consider making use of the sys.dm_db_index_usage_stats dynamic management view (dmv). B. you should consider making use of the sys.dm_db_missing_index_columns dynamic management view (dmv). C. you should consider making use of the sys.dm_db_missing_index_details dynamic management view (dmv). D. you should consider making use of the sys.dm_db_missing_index_group_stats dynamic management view (dmv). Answer: C Question: 86 You work as a network database administrator at Compnay.com in London. The Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. .com has recently requested that you develop a query for a partner company named weyland industries. The query written for wetland industries is shown below: select staffed, management, loginid from dbo.inventory where management = 1500 order by management; during the course of the day you receive instruction from Compnay.com to have the written query make use of a preconfigured execution plan by adding the proper hint required to perform the operation. What should you do? A. you should consider making use of the index(1) hint. B. you should consider making use of the index(pk_staff) hint. C. you should consider making use of the index(ix_staff) hint. D. you should consider making use of the index(0) hint. Answer: C Question: 87 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 which has the collation set to sql_latin_general_cp1_ci_as hosting the inventory database which has a collation set to sql_scandinavian_cp850_ci_as. during the course of the day you receive instruction from Compnay.com to create and populate a temporary table #product from dbo.inventory in the inventory database using the statement shown below: use mydb; create table #product (last name nchar(128)); insert into #product select last name from dbo.inventory; you have later decided to execute the command below: select * from dbo.product a join #product b on a.lastname = b.lastname; You have later discovered that executing the command returns the error message shown below: "cannot resolve the collation conflict between "sql_latin1_general_cp1_ci_as" and "sql_scandinavian_cp850_ci_as" in the equal to operation" Compnay.com wants you to ensure that you are able to resolve the conflict. What should you do? A. you should consider making use of the transact-sql statement below: create table #product (last name nvarchar(128) collate sql_latin1_general_cp1_ci_as);
Page 38 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

B. you should consider making use of the transact-sql statement below: create table tm product (last name nvarchar(128) collate sql_latin1_general_cp1_ci_as); C. you should consider making use of the transact-sql statement below: create table #product (last name nvarchar(128) collate database default); D. you should consider making use of the transact-sql statement below: create table #product (last name nvarchar(128) sparse); Answer: C Question: 88 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to have a number of database mail messages deleted which have been sent to Company.com. Compnay.com has additionally requested that you have all e-mails deleted which are more than a month old. What should you do? A. you should consider running the transact-sql statements below: declare @onemonthago date time = date add(mm,-1,getdate()) exec msdb.dbo.sysmail_delete_mailitems_sp @onemonthago B. you should consider running the transact-sql statements below: declare @onemonthago date time = date add(mm,-1,getdate()) exec msdb.dbo.sysmail_delete_log_sp @onemonthago,'success' C. you should consider running the transact-sql statements below: declare @onemonthago date time = date add(mm,-1,getdate()) exec msdb.dbo.sysmail_delete_mailitems_sp @onemonthago,'sent' D. you should consider running the transact-sql statements below: declare @onemonthago date time = date add(mm,-1,getdate()) exec msdb.dbo.sysmail_delete_log_sp @onemonthago Answer: C Question: 89 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which uses database mail. during the course of the day you receive instruction from Compnay.com to have e-mail notifications delivered. testkin.com has recently discovered that a user named Rory allen does not receive the e-mail notifications. Compnay.com wants you to verify if the e-mail notifications sent by database mail is successful. What should you do? A. you should consider making use of the msdb.dbo.sysmail_unsentitems object from the msdb database. B. you should consider making use of the msdb.dbo.sysmail_faileditems object from the msdb database. C. you should consider making use of the msdb.dbo.sysmail_sentitems object from the msdb database. D. you should consider making use of the msdb.dbo.sysmail_event_log object from the msdb database. Answer: B

Page 39 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 90 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to have a fulltext search configured for weyland industries which ignores specific words in searches. What should you do? A. you should consider making use of the thesaurus file full-text search component. B. you should consider making use of the word breakers full-text search component. C. you should consider making use of the stop list full-text search component. D. you should consider making use of the filter full-text search component. Answer: C Question: 91 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting multiple databases for Company.com. during the course of the day you receive instruction from Compnay.com to develop a power shell script which would determine if the databases on the server are greater than 100gb by opening power shell from sql server management studio to create the variables shown below: ps sqlserver:\sql\Company> $multipleofgb = 1024 * 1024 ps sqlserver:\sql\Company> $server = get-item Compnay.com wants you to select the script which would return the desired results. What should you do? A. you should consider making use of the script below: $server | where-object{($_.database size * $multipleofgb) -match 100gb\} | select-object name, database size B. you should consider making use of the script below: $server. databases | where-object{($_.size * $multipleofgb) -gt 100gb\} | select-object name, size C. you should consider making use of the script below: $server. databases | where-object{($_.size * $multipleofgb) -match 100gb\} | select-object name, size D. you should consider making use of the script below: $server | where-object{($_.database size * $multipleofgb) -gt 100gb\} | select-object name, database size Answer: B Question: 92 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to have your level of proficiency rated using database mail, full-text search, windows power shell, sql server management objects and service broker. What would your response be? A. you should inform Compnay.com that your level of proficiency is moderate. B. you should inform Compnay.com that your level of proficiency is very high. C. you should inform Compnay.com that your level of proficiency is high. D. you should inform Compnay.com that your level of proficiency is very low.
Page 40 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

E. you should inform Compnay.com that your level of proficiency is low. Answer: B Question: 93 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. Compnay.com has recently finished configuring the service broker to process messages within the inventory database and performed the actions below: 1. Compnay.com has created the message type. 2. Compnay.com has created the contract. 3. Compnay.com created the queue. During the course of the day you receive instruction from Compnay.com to complete the configuration of the service broker. What should you do? A. you should consider having the service create. B. you should consider having the endpoint create. C. you should consider having the broker priority create. D. you should consider having the route create. Answer: A Question: 94 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which has a service broker queue named weylandrequests. during the course of the day testkin.com decided to restore the database to a new server and discovered that the service broker no longer sends new messages. Compnay.com recently requested that you have the service broker configured to resolve the issue. What should you do? A. you should consider making use of the transact-sql stamen below: alter queue weylandrequests with status = on; B. you should consider making use of the transact-sql stamen below: alter database inventory set enable broker; C. you should consider making use of the transact-sql stamen below: alter database inventory set new broker; D. you should consider making use of the transact-sql stamen below: alter queue weylandrequests with activation (status = on); Answer: C Question: 95 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. Compnay.com has recently configured a service broker to support a web site which uses an internal application. during the course of the day Compnay.com discovers that the web site generates a greater workload using the internal application. Compnay.com has recently requested that you configure service broker to ensure messages sent from the internal application are processed before sent to the web site. What should you do?
Page 41 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. you should consider making use of the transact-sql stamen below: alter queue with activation B. you should consider making use of the transact-sql stamen below: alter service C. you should consider making use of the transact-sql stamen below: create broker priority D. you should consider making use of the transact-sql stamen below: create contract Answer: C Question: 96 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. company.com has recently started exchanging information with a company named wetland industries using xml and web services. during the course of the day you receive instruction from company.com to have a schema collection removed which is no longer used whilst confirming the schema is no longer in use before being dropped. company.com has additionally requested that you determine which catalog view to use if the schema collection is being used. what should you do? A. you should consider making use of the sys.xml_schema_collections catalog view. B. you should consider making use of the sys.column_xml_schema_collection_usagescatalog view. C. you should consider making use of the sys.xml_schema_components catalog view. D. you should consider making use of the sys.xml_schema_namespaces catalog view. Answer: B Question: 97 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database which uses change tracking on a table named inventory.productorder. during the course of the day you receive instruction from Compnay.com to verify whether all the columns have changed since the minimum valid version. What should you do? A. you should consider making use of the changeable with the version argument function. B. you should consider making use of the change_tracking_is_column_in_mask function. C. you should consider making use of the changeable with the changes argument function. Answer: C Question: 98 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 that is configured to host the inventory database. during the course of the day you receive instruction from Compnay.com to have a table named inventory.productorder which has change tracking enabled modified for a company named wetland industries to have the change tracking disabled prior to modifying the inventory.productorder table. what should you do?

Page 42 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. you should consider making use of the transact-sql statement below: alter table inventory.productorder disable change tracking B. you should consider making use of the transact-sql statement below: alter database inventory set change tracking = off C. you should consider making use of the transact-sql statement below: exec sys.sp_cdc_disable_table @source schema = n'inventory', @source name = n'productorder', @capture instance = n'inventory_productorder' D. you should consider making use of the transact-sql statement below: exec sys.sp_cdc_disable_db Answer: A Question: 99 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 that is configured to host the inventory database. Compnay.com has recently developed the xml document shown below which contains inventory information: declare @prodlist xml =' <product list xmlns="urn:wide_world_importers/schemas/products"> <product name="product1" category="food" price="12.3" /> <product name="product2" category="drink" price="1.2" /> <product name="product3" category="food" price="5.1" /> ... </product list>'; During the course of the day you receive instruction from Compnay.com to have a list of products returned which contains the product named, category and price of each product. What should you do? A. you should consider making use of the query below: select prod. value('.[1]/@name','varchar(100)'), prod. value('.[1]/@category','varchar(20)'), prod. value('.[1]/@price, money') B. you should consider making use of the query below: select prod. value('@name','varchar(100)'), prod. value('@category','varchar(20)'), prod. value('@price, money') from @prodlist.nodes('/product list/product') prod list(prod); C. you should consider making use of the query below: with xmlnamespaces(default 'urn:wide_world_importers/schemas/products') select prod. value('./@name','varchar(100)'), prod. value('./@category','varchar(20)'), prod. value('./@price, money') from @prodlist.nodes('/product list/product') prod list(prod); D. you should consider making use of the query below: with xmlnamespaces(default 'urn;wide_world_importers/schemas/products' as o) select prod. value('name[1]','varchar(100)'), prod. value('category[1]','varchar(20)'), prod. value('price[1]','money') from @prodlist.nodes('/o:productlist/o:product') prod list(prod);

Page 43 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: C Question: 100 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have the table identified which is referenced by name in the stored procedure which does not make use of dynamic sql.what should you do? A. you should consider making use of the information_schema.tables catalog view. B. you should consider making use of the sys.procedures catalog view. C. you should consider making use of the sys.sql_expression_dependencies catalog view. D. you should consider making use of the information_schema.routines catalog view. Answer: C Question: 101 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database making use of stored procedures to perform delete, select, insert and update statements. during the course of the day you receive instruction from company.com to provide recommendations of indexes which should be created and dropped from the database ensuring you use the proper method. what should you do? A. you should consider making use of the index usage dmvs. B. you should consider making use of the database engine tuning advisor. C. you should consider making use of the sql server profiler. D. you should consider making use of the missing index dmvs. Answer: B Question: 102 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named products and orders. during the course of the day you receive instruction from Compnay.com to write a select statement which will output product and order data as a valid well formed xml document by mixing the attribute and element asked xml within the document. you have later determined that you will not make use of the for xml auto clause and Compnay.com requested that you select a suitable for xml clause. what should you do? (choose two) A. you should consider making use of the for xml explicit xml clause. B. you should consider making use of the for xml path xml clause. C. you should consider making use of the for browse xml clause. D. you should consider making use of the for xml raw xml clause. Answer: A, B Question: 103 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory
Page 44 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

database. during the course of the day you receive instruction from Compnay.com to troubleshoot the performance of a query by having the graphical execution plan captured whilst ensuring that you save the plan file to be used with sql server management studio for displaying the graphical execution plan. What should you do? A. you should consider making use of the .psql file extension. B. you should consider making use of the .gif file extension. C. you should consider making use of the .sqlplan file extension. D. you should consider making use of the .sqlplan file extension. Answer: C Question: 104 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you received instruction from Compnay.com to have a server side trace created which created 35 trace files. Compnay.com has additionally requested that you load the trace files on your workstation using the database called per data for further analysis by loading three files starting at c:\t-king\trace_32. what should you do? A. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace.trc', 3) B. you should consider using the transact-sql statement below: select * into per data from ( select * from ::fn_trace_gettable ('c:\t-king\trace_32.trc', default) union all select * from ::fn_trace_gettable ('c:\t-king\trace_33.trc', default) union all select * from ::fn_trace_gettable ('c:\t-king\trace_34.trc', default) ) trc C. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace32.trc', default) D. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace_32.trc', 3) Answer: D Question: 105 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to have a workload created for a company named wetland industries that will be used by the database engine tuning advisor (dta). Compnay.com has additionally requested that you have the workload created in the proper format for wetland industries. What should you do? (choose all that apply)

Page 45 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

A. you should consider making use of the sql server profiler trace file format. B. you should consider making use of the sql server event log format. C. you should consider making use of the sql server transaction log format. D. you should consider making use of the xml file format. E. you should consider making use of the performance counter log file format. F. you should consider making use of the transact-sql script format. Answer: A, D, F Question: 106 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to troubleshoot the slow performance of queries. you have later decided to run the dynamic management view (dmv) query below on -db01. select top (10) wait type, wait_time_ms from sys.dm_os_wait_stats order by wait_time_ms desc; you have finished executing the dynamic management view (dmv) query and a top wait type of sos-scheduler_yielD. Compnay.com has additionally requested that you identify the cause of the deteriorating server response issues. What should you do? A. you should first investigate the disk resource. B. you should first investigate the cpu resource. C. you should first investigate the network resource. D. you should first investigate the memory resource. Answer: B Question: 107 You work as a network database administrator at Compnay.com in London. The Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from Compnay.com to evaluate a database design for a company named wetland industries. wetland industries has requested that Compnay.com ensures all the tables in the database have a clustered index whilst verifying the tables missing a clustered index by making use of the system catalog views. What should you do? A. you should consider making use of the transact-sql statement below: select name as table name from sys.tables where object property(object_id,'tablehasuniquecnst') = 0 order by name; B. you should consider making use of the transact-sql statement below: select name as table name from sys.tables where object property(object_id,'tablehasclustindex') = 1 and object property(object_id,'tablehasuniquecnst') = 1 order by name; C. you should consider making use of the transact-sql statement below:
Page 46 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

select name as table name from systoles where object property(object_id,'tablehasclustindex') = 0 and object property(object_id,'tablehasuniquecnst') = 1 order by name; D. you should consider making use of the transact-sql statement below: select name as table name from sys.tables where object property(object_id,'tablehasclustindex') = 0 order by name; Answer: D Question: 108 You work as a network database administrator at Company.com. the Compnay.com network currently makes use of Microsoft sql server 2008 as their database management solution. Compnay.com currently makes use of a database server named -db01 hosting the inventory database. Compnay.com has recently started exchanging information with a company named wetland industries using xml and web services. during the course of the day you receive instruction from Compnay.com to have a schema collection removed which is no longer used whilst confirming the schema is no longer in use before being dropped. Compnay.com has additionally requested that you determine which catalog view to use if the schema collection is being used. What should you do? A. you should consider making use of the sys.xml_schema_collections catalog view. B. you should consider making use of the sys.column_xml_schema_collection_usages catalog view. C. you should consider making use of the sys.xml_schema_components catalog view. D. you should consider making use of the sys.xml_schema_namespaces catalog view. Answer: B Question: 109 You work as a network database administrator at Company.com. The Company.com network currently makes use of Microsoft sql server 2008 as their database management solution. Company.com currently makes use of a database server named -sr01 hosting the inventory database containing two tables shown below: inventory inventoried inventory name vend rid 1 fruits1 0 2 vegetables2 1 3 meat3 1 4 clothing4 0 productchanges inventoried inventory name vend rid 1 fruits1 1 2 vegetables2 1 3 shoes3 2 5 sportsequipment5 1 during the course of the day you receive instruction from Company.com to execute the statement shown below: merge inventory using productchanges on (inventory.inventoryid = productchanges.inventoryid) when matched and inventory.vendorid = 0
Page 47 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

then delete when matched then update set inventory.productname = productchanges.inventoryname inventory.vendorid = productchanges.vendorid; Company.com has additionally requested that you have the rows identified which would be displayed in the inventory table. what should you do? A. the rows that would be displayed in the inventory table are: inventoried inventory name vend rid 2 vegetables2 1 3 shoes3 2 4 clothingt4 0 B. the rows that would be displayed in the inventory table are: inventoried inventory name vend rid 1 fruits1 1 2 vegetables2 1 3 shoes3 2 4 clothingt4 0 5 sportsequipment5 1 C. the rows that would be displayed in the inventory table are:inventoryid inventory name vend rid 2 vegetables2 1 3 shoes3 2 D. the rows that would be displayed in the inventory table are: inventoried inventory name vend rid 1 fruits1 1 2 vegetables2 1 3 shoes3 2 5 sportsequipment5 1 Answer: A Question: 110 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. company.com has recently granted a user named rory allen select access to the inventory schema. during the course of the day you receive instruction from company.com to have rory allen's select access removed from the inventory.productorder table whilst ensuring the other permissions are not affected. what should you do? A. you should consider making use of the transact-sql statement below: drop user Rory allen; B. you should consider making use of the transact-sql statement below: revoke select on inventory.productorder from rory allen; C. you should consider making use of the transact-sql statement below: deny select on inventory.productorder to Rory allen; D. you should consider making use of the transact-sql statement below: grant delete on inventory.productorder to Rory allen; Answer: C

Question: 111 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database
Page 48 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have tables added and altered only on the first of the month whilst ensuring when the tables are attempted to be modified after the first that an error would be received. what should you do? A. you should consider making use of the transact-sql statement below: create trigger trg_tables_on_first on all server for alter database as if date part(day,getdate())>1 begin rollback raiser or ('must wait till next month.', 16, 1) end B. you should consider making use of the transact-sql statement below: create trigger trg_tables_on_first on database for create_table,alter_table as if date part(day,getdate())>1 begin raiser or ('must wait till next month.', 16, 1) end C. you should consider making use of the transact-sql statement below: create trigger trg_tables_on_first on database for create_table,alter_table as if date part(day,getdate())>1 begin rollback raiser or ('must wait till next month.', 16, 1) end D. you should consider making use of the transact-sql statement below: create trigger trg_tables_on_first on database for create table as if date part(day,getdate())>1 begin raiser or ('must wait till next month.', 16, 1) end Answer: C Question: 112 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database which contains a table named product which has an marcher column named pcode. company.com recently informed you that the product table has a clustered index unpredicted and the pcode column contains English and French characters. you have successfully developed the code segment below to search by pcode:@lang ='English' select predicted, code from product where code = @search name collate cyrillic_general_ci_as

Page 49 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

if @lang = 'French' select predicted, pcodefrom productwhere pcode = @search name collate french_ci_as_ks during the course of the day you receive instruction from company.com to make use of the sql server to enable index searches for the above queries. what should you do? A. you should consider having an index created on the code column. B. you should consider having a new column created for each collation to be searched and copy the data from the code column. you should then have an index created on each new column. C. you should consider having a computed column created for each collation to be searched. you should than have an index created on each computed column. D. you should consider having a computed column created for each collation to be searched. you should then have an index created on the code column. Answer: C Question: 113 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have a table created for a company named wetland industries containing a column which stores the current time accurate to ten microseconds whilst ensuring that you make use of a system function with the default option in the column definition. what should you do? A. you should consider making use of the getutcdate system function. B. you should consider making use of the sysdatetime system function. C. you should consider making use of the current timestamp system function. D. you should consider making use of the date add system function. Answer: B Question: 114 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create an assembly for a company named waylaid industries which uses unmanaged code in order to access external resources whilst ensuring that you deploy the assembly using the appropriate permissions. what should you do? A. you should consider having the default permission set used. B. you should consider having the external access permission set used. C. you should consider having the safe permission set used. D. you should consider having the unsafe permission set used. Answer: D Question: 115 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two schemas named inventory and sales. the inventory schema is owned by a user named rory allen and the sales schema is owned by a user named mea ham. during the course of the day you receive instruction to have a user named dean Austin the ability to access the sales. orders table using the stored procedure named inventory.getsalesummary. you have later noticed that dean Austin has not been granted the select permission on the sales.
Page 50 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

orders table but the user kara Lang has. company.com wants you to have the appropriate permissions implemented for dean Austin. what should you do? A. you should consider having the inventory.getsalessummary created using the executes caller clause. you should then have dean Austin granted the impersonate permission for the user named Kara lang. B. you should consider having the inventory.getsalessummary created without using the execute as clause. you should then have dean Austin granted the select permission on the sales. orders table. C. you should consider having the inventory.getsalessummary created using the execute as owner clause. you should then have dean Austin granted the execute with grant option on inventory.getsalessummary. D. you should consider having the inventory.getsalessummary created using the execute as 'Kara long' clause. you should then have dean Austin granted the execute permission on the inventory.getsalessummary. Answer: D Question: 116 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have a function created for a company named wetlands industries which references a table whilst ensuring that you stop the table from being dropped. what should you do? A. you should consider making use of the with encryption option. B. you should consider making use of the with schema binding option. C. you should consider making use of the with returns null on null input option. D. you should consider making use of the with execute as option. Answer: B Question: 117 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to query sys.dm_db_index_usage_stats for checking the status of indexes in the inventory database. you tried accomplishing the task but the query fails and you receive the error listed below: "the user does not have permission to perform this action" company.com wants you to ensure that the least amount of permissions granted to access dynamic management views. what should you do? A. you should consider having the control permission granted. B. you should consider having the view database state permission granted. C. you should consider having the create external access assembly permission granted. D. you should consider having the view server state permission granted. Answer: D Question: 118 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory
Page 51 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

database containing a table named king customers which has a xml column named king data which has no indexes on the table. You have later decided to use the where clause in the query shown below: where kingdata.exist ('/customerdemographic/@age[.>="21"]') = 1 during the course of the day you receive instruction from company.com to have indexes created for the query used. what should you do? A. you should consider writing the transact-sql statement below: create primary xml index pxml_idx_customer on king customers(king data); create xml index sxml_idx_customer on king customer(king data) using xml index pxml_idx_customer for path; B. you should consider writing the transact-sql statement below: create primary xml index pxml_idx_customer on king customers(king data); create xml index sxml_idx_customer on king customer(king data) using xml index pxml_idx_customer for value; C. you should consider writing the transact-sql statement below: create clustered index cl_idx_customer on king customers(custom rid); create primary xml index pxml_idx_customer on king customers(king data); create xml index sxml_idx_customer_property on king customer(king data) using xml index pxml_idx_customer for value; D. you should consider writing the transact-sql statement below: create clustered index cl_idx_customer on king customers(custom rid); create primary xml index pxml_idx_customer on king customers(king data); create xml index sxml_idx_customer on king customer(king data) using xml index pxml_idx_customer for path; Answer: D Question: 119 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named dbo.clients created using the transact-sql statement below: create table dbo.clients ( cliental int identity(1,1) primary key clustered, account number marcher(25) not null, first name marcher(50) not null, last name marcher(50) not null, addressline1 marcher(255) not null, addressline2 marcher(255) not null, city marcher(50) not null, state province marcher(50) not null, country marcher(50) not null, postal code marcher(50) not null, create date date time not null default(get date()), modified date time not null default(get date())
Page 52 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

) company.com has later decided to have a stored procedure created which includes the account number, country and state province columns from the dbo.clients table. during the course of the day you receive instruction from company.com to have the stored procedure accept a parameter to filter output on the account number column whilst ensuring that performance is optimized for the stored procedure without changing the table structure. what should you do? A. you should consider making use of the transact-sql statement below: create statistics st_client_accountnumber on dbo.client (account number) with full scan; B. you should consider making use of the transact-sql statement below: create clustered index ix_client_accountnumber on dbo.client (account number); C. you should consider making use of the transact-sql statement below: create no clustered index ix_client_accountnumber on dbo.client (account number) include (country, state province); D. you should consider making use of the transact-sql statement below: create no clustered index ix_client_accountnumber on dbo.client (account number) where account number = ''; Answer: C Question: 120 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. the inventory database contains a table named dob.products which has the table definition below: create table [dbo].[products]( [predicted] [int] identity(1,1) not null primary key clustered, [order date] [date time] not null, [cliental] [int] not null, [staffpersonid] [int] null, [commentdate] [date] null); company.com is aware that the products table contains millions of rows and requested you run the query shown below to determine when staff comments in the dbo.products table: select salesid,customerid,salespersonid,commentdate from dbo.products where commentdate is not null and staffpersonid is not null; during the course of the day you discovered that the query performs slowly since only 2% of the rows have comment dates with the staffpersonid being null on 15% of the rows. company.com recently requested that you create an index to optimize the query ensuring that the index conserves disk space whilst optimizing the query. what should you do? A. you should consider having the index below created: create no clustered index idx1 on dbo.products (commentdate, staffpersonid) include(cliental) where commentdate is not null; B. you should consider having the index below created: create no clustered index idx1 on dbo.products (cliental) include(commentdate)
Page 53 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

where staffpersonid is not null; C. you should consider having the index below created: create no clustered index idx1 on dbo.products (staffpersonid) include (commentdate,clientid); D. you should consider having the index below created: create no clustered index idx1 on dbo.products (cliental) include (commentdate,staffpersonid); Answer: A Question: 121 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database of size 5gb which contains a table named product history which is frequently inserted and updated with product information. during the course of the day whilst performing routine maintenance you discover that excessive page splitting is occurring. company.com has recently requested that you reduce the occurrence of page splitting in the product history table. what should you do? A. you should consider making use of the code segment below: update statistics inventory.producthistory(products) with full scan, nor compute; B. you should consider making use of the code segment below: exec sys.sp_configure 'fill factor (%)', '60'; C. you should consider making use of the code segment below: alter index all on inventory.producthistory rebuild with (fill factor = 60); D. you should consider making use of the code segment below: alter database inventory modify file (name = salesdat3, size = 10gb); Answer: C Question: 122 you work as a network database administrator at company.com in London. The company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a single table named products. the products table currently has 70,000 rows and no indexes exist. company.com has recently developed a function named fg_productdata. company.com additionally requested that you define the product table using the transact-sql statement below: create table product ( column a int not null, column archer(20) null) on [primary]; during the course of the day you receive instruction from company.com to have the product table moved from the primary file group to fg_productdata. what should you do? A. you should consider making use of the transact-sql statement below: create clustered index idx_product on product(column) on [fg_productdata]; B. you should consider making use of the transact-sql statement below: create no clustered index idx_product on product(columnar) on fg_productdata(columnar); C. you should consider making use of the transact-sql statement below: create no clustered index idx_product on product(columnar) on [fg_productdata];
Page 54 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

D. you should consider making use of the transact-sql statement below: create clustered index idx_product on product(columnar) on fg_productdata(columnar); Answer: D Question: 123 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. the inventory database contains a computed column with a user-defined function which returns formatted credit account number. company.com has recently decided to have the column indexed to ensure adequate search performance. during the course of the day you receive instruction from company.com to identify the combination of valid object properties values for the user-defined function. what should you do? A. you should consider making use of the combination shown below: is deterministic = true issystemverified = true user data access = false system data access = false B. you should consider making use of the combination shown below: is deterministic = false issystemverified = true userdataaccess = false systemdataaccess = false C. you should consider making use of the combination shown below: is deterministic = false issystemverified = true is precise = true systemdataaccess = false D. you should consider making use of the combination shown below: is deterministic = true issystemverified = true is precise = true istablefunction = true Answer: A Question: 124 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create a column for wetlands industries which allows the creation of a unique constraint. what should you do? (choose two) A. you should consider using the column definition below: marcher(100) null B. you should consider using the column definition below: marcher(max) not null C. you should consider using the column definition below: marcher(100) not null D. you should consider using the column definition below: marcher(100) sparse null

Page 55 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: A, C Question: 125 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named customer products. during the course of the day you receive instruction from company.com to ensure that the customer products data table meets the requirements set below: 1. company.com requires having the credit limit zero unless customer identification is verified. 2. company.com requires having the credit limit less that 11000. what should you do? A. you should consider making use of the constraint below: check (verified = 1 and credulity between 1 and 11000) B. you should consider making use of the constraint below: check (credulity between 1 and 11000) C. you should consider making use of the constraint below: check ((credulity = 0 and verified = 0) and (credulity between 1 and 11000 and verified = 1)) D. you should consider making use of the constraint below: check ((credulity = 0 and verified = 0) or (credulity between 1 and 11000 and verified= 1)) Answer: D Question: 126 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 that is configured to host the inventory database which contains two tables named product and development. during the course of the day you receive instruction from company.com to ensure that the inventory listed in the product table in the inventory database has a corresponding record in the development table. what should you do? A. you should consider making use of the join method. B. you should consider making use of the ddl trigger method. C. you should consider making use of the primary key constraint method. D. you should consider making use of the foreign key constraint method. Answer: D Question: 127 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -sr01 hosting the inventory database which will have a new column named products added to a table named inventory.oriduct table using a unique constraint. during the course of the day you receive instruction from company.com to ensure that the information below is applied when the new column is added: 'a1' and 'a1' are treated as different values 'a' and 'a' sort before 'b' and 'b' in an order by clause company.com has additionally requested that you have the collation selected which would meet the requirements for the new column. what should you do? A. you should consider making use of the sql_latin1_general_cp1_ci_ai collation. B. you should consider making use of the sql_latin1_general_cp1_cs_as collation. C. you should consider making use of the sql_latin1_general_cp1_ci_as collation. D. you should consider making use of the latin1_general_bin collation.

Page 56 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: B Question: 128 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which has multiple tables which represents properties of the same entity kind which are made of text, geometry, marcher(max), and user-defined types specified as 'bit not null' data types. during the course of the day you receive instruction from company.com to have the data consolidated from multiple tables into a single table which will use semi-structured storage taking advantage of the sparse option. company.com additionally wants you to identify the data types which are compatible with the sparse option. what should you do? A. the geometry data type is compatible with the sparse option. B. the archer(max) data type is compatible with the sparse option. C. the text data type is compatible with the sparse option. D. the user-defined type defined as 'bit not null data type is compatible with the sparse option. Answer: B Question: 129 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create a table for a company named wetland industries which stores gps locations of clients whilst ensuring that the table is allowed to identify clients within a specific inventory boundary whilst calculating the distance between the client and closest store. what should you do? A. you should consider making use of the geometry data type. B. you should consider making use of the virginity(max) file stream data type. C. you should consider making use of the geography data type. D. you should consider making use of the marcher(max) data type. Answer: C Question: 130 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create a table in the inventory database to be used for storing information for a week whilst ensuring that you implement a partitioned table to meet the requirements of company.com. what should you do? A. you should consider having a partition function and partition scheme created. you should then have the distributed partitioned view created. B. you should consider having a partition function and partition scheme created. you should then have the table created. C. you should consider having a partition function and the table created. you should then have a filtered index created. D. you should consider having a secondary file added to the primary file groups and create the table. you should then have the distributed partitioned view created. Answer: B
Page 57 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 131 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database which contains two partitioned tables named product and archive. during the course of the day you receive instruction from company.com to have a partition of the product table archived to the archive table. what should you do? A. you should consider making use of the method below: alter partition function ... split ... B. you should consider making use of the method below: alter partition function ... merge ... C. you should consider making use of the method below: alter table ... switch ... D. you should consider making use of the method below: insert ... select ...; truncate table Answer: C Question: 132 You work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to alter the stored procedures to use the with recompile option by selecting which stored procedures to alter. what should you do? (choose two) A. you should consider altering the stored procedures which require the for replication option. B. you should consider altering the stored procedures which require the with encryption option. C. you should consider altering the stored procedures which implemented from clrassemblies. D. you should consider altering the stored procedures which contain queries that use the option (recompile) hint. Answer: B, D Question: 133 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. during the course of the day you receive instruction from company.com to develop a stored procedure for a company named wetland industries which is required to accept a table-valued parameter named @weyland.what should you do? A. you should consider making use of the code segment below: create procedure add clients (@wetland marcher (max)) as external name client.add.newclient B. you should consider making use of the code segment below: create procedure add clients (@wetland marcher(max))
Page 58 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

C. you should consider making use of the code segment below: create procedure add clients (@wetland client type output) D. you should consider making use of the code segment below: create procedure add clients (@wetland client read-only) Answer: D Question: 134 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing the products table which is updated using a third-party application to insert data directly into a table. during the course of the day you receive instruction from company.com to have two columns added to the table which will not accept null values or use the default constraints. company.com has additionally requested that you ensure the new columns do not break the third-party application. what should you do? A. you should consider having an after insert trigger created. B. you should consider having an instead of insert trigger created. C. you should consider having a ddl trigger created. D. you should consider having a stored procedure created. Answer: B Question: 135 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database. during the course of the day you receive instruction from company.com to ensure that the tables are not dropped from the inventory database for a company named wetland industries. what should you do? A. you should consider creating a dml trigger which contains commit. B. you should consider creating a dml trigger which contains rollback. C. you should consider creating a ddl trigger which contains rollback. D. you should consider creating a dml trigger which contains commit. Answer: C Question: 136 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named product and product details which are related to each other using the predicted column in each table. during the course of the day you receive instruction from company.com to have the modified date column of the product table reflect the date and time when changes are made to the product details table for related products by creating a trigger. what should you do? A. you should consider writing the transact-sql statement below: create trigger [emendate] on [product details] instead of update for replications update [product]
Page 59 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

set [lastmodifieddate] = get date() from inserted where inserted.[predicted] = [product].[predicted]; B. you should consider writing the transact-sql statement below: create trigger [emendate] on [product] instead of update not for replication as update [product] set [lastmodifieddate] = get date() from inserted where inserted.[predicted] = [product].[predicted]; C. you should consider writing the transact-sql statement below: create trigger [emendate] on [product details] after update not for replication as update [product] set [lastmodifieddate] = get date() from inserted where inserted.[predicted] = [product].[predicted]; D. you should consider writing the transact-sql statement below: create trigger [mandate] on [product] after update for replication as update [product] set [lastmodifieddate] = get date() from inserted where inserted.[predicted] = [order].[predicted]; Answer: C Question: 137 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which uses a single clr assembly which references only blessed assemblies from microsoft .net framework. during the course of the day you receive instruction from company.com to have the assembly deployed using the least amount of permissions required whilst ensuring that the database remains very protective. what should you do? A. you should consider having the option below set: permission set = external access trustworthy off B. you should consider having the option below set: permission set = safe trustworthy on C. you should consider having the option below set: permission set = safe trustworthy off D. you should consider having the option below set: permission set = unsafe trustworthy on Answer: C

Page 60 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 138 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to make use of try...catch error handling.company.com has additionally requested that you raise an error which would pass control to the catch block. what should you do? A. you should consider making use of the 9 severity level. B. you should consider making use of the 0 severity level. C. you should consider making use of the 10 severity level. D. you should consider making use of the 16 severity level. Answer: D Question: 139 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. company.com has recently requested that you write a code segment to be used and you produced the code segment shown below: declare @range start int = 0; declare @range end int = 11000; declare @range step int = 1; with number range(item value)as (select item value from (select @range start as item value) as union all select item value + @range step from number range where item value < @range end)select item value from number range option (maxrecursion 100) during the course of the day you receive instruction from company.com to determine the results that would be yielded by running the code segment? A. the code segment used would have 101 rows returned with a maximum recursion error. B. the code segment used would have 11,001 rows returned with no error. C. the code segment used would have 101 rows returned with no error. D. the code segment used would have 10,001 rows returned with a maximum recursion error. Answer: A Question: 140 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named products and product details. company.com is aware that the products table has a foreign key relationship with the product details table on the predicted column. during the course of the day you developed the transact-sql batch shown below: begin try begin transaction delete from products where product = 5; begin transaction insert into product details ( ordered, predicted, quantity ) values ( 1234, 5, 12 ); commit transaction
Page 61 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

commit transaction end try begin catch rollback transaction print error message(); end catch company.com has recently requested that you analyze the results of executing the batch by selecting the expected results returned? A. the transact-sql batch executed would have the product deleted from the products table but the product details will not be inserted into the product details table. B. the transact-sql batch executed would have the product not deleted from the products table and the product details will not be inserted into the product details table. C. the transact-sql batch executed would have the product not deleted from the products table but would have the product details inserted into the product details table. D. the transact-sql batch executed would have the product deleted from the products tableland the product details will be inserted into the product details table. Answer: B Question: 141 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named inventoryupdate. during the course of the day you receive instruction from company.com to have a row deleted from the inventoryupdate table by writing a transaction allowing the database restoration to the exact point the record was deleted without the time of execution. what should you do? A. you should consider making use of the query below: begin transaction delete inventory with mark delete from inventory update where inventoryupdateid = 10; commit transaction delete inventory; B. you should consider making use of the query below: declare @inventory name marcher(50) = 'delete inventory' begin transaction @inventory name delete from inventory update where inventoryupdateid = 10; commit transaction @inventory name; C. you should consider making use of the query below: begin transaction with mark n'deleting a inventory update'; delete from inventoryupdate where inventoryupdateid = 10; commit transaction D. you should consider making use of the query below: begin transaction delete from inventoryupdate where inventoryupdateid = 10; commit transaction; Answer: A

Page 62 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 142 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains one thousand products with unit numbers of the sold products. during the course of the day you receive instruction from company.com to have a query created which displays the top5% of products sold most frequently. what should you do? A. you should consider making use of the transacts code segment below: with percentages as ( select *, ntile(20) over (order by units sold) as grouping column from product counts) select * from percentages where grouping column = 1; B. you should consider making use of the transacts code segment below: with percentages as ( select *, ntile(5) over (order by units sold) as grouping column from product counts) select * from percentages where grouping column =1; C. you should consider making use of the transacts code segment below: with percentages as ( select *, ntile(20) over (order by units sold) as grouping column from product counts) select * from percentages where grouping column = 20 D. you should consider making use of the transacts code segment below: with percentages as ( select *, tile(5) over (order by units sold) as grouping column from product counts) select * from percentages where grouping column = 5; Answer: C Question: 143 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have the value 2.75 rounded to the nearest whole number. what should you do? A. you should consider making use of the code segment: select round(1.75,2) B. you should consider making use of the code segment: select round(1.75,2.0) C. you should consider making use of the code segment: select round(1.75,0) D. you should consider making use of the code segment: select round(1.75,1.0) Answer: C Question: 144 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains product information for a sister company named wetland industries.
Page 63 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

during the course of the day you receive instruction from company.com to have the product with the highest average unit price identified whilst ensuring and order total greater than 7000 identified whilst ensuring that the list contains only 25 product orders. what should you do? A. you should consider making use of the query below: select top (25) o.productorderid, o.orderdate, outtalk, sum(od.qty * od.unitprice) / sum(od.qty) as [avgunitprice] from product.productorderheader o join product.productorderdetail od on o.productorderid = od.productorderid where outtalk> 8000 group by o.productorderid, o.orderdate, outtalk order by total desc; B. you should consider making use of the query below: select top (25) o.productorderid, o.orderdate, outtalk, (select sum(od.qty * od.unitprice) / sum(od.qty) from product.productorderdetail od where o.productorderid = od.productorderid) as [avgunitprice] from product.productorderheader o where outtalk > 8000 order by outtalk desc, avgunitprice; C. you should consider making use of the query below: select top (25) o.productorderid, o.orderdate, o.total, (select sum(od.qty * od.unitprice) / sum(od.qty) from product.productorderdetail od where o.productorderid = od.productorderid) as [avgunitprice] from product.salesorderheader o where o.total> 8000 order by avgunitprice desc; D. you should consider making use of the query below: select top (25) o.productorderid, o.orderdate, outtalk, sum(od.qty * od.unitprice) / sum(od.qty) as [avgunitprice] from product.productorderheader o join product.productorderdetail od on o.productorderid = od.productorderid where outtalk> 8000 group by o.productorderid, o.orderdate, o.total order by avgunitprice; Answer: C

Page 64 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 145 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create and populate a table named inventory navigation. you have later decided to write the code shown below: create table inventory navigation ( inventorynavigationid int primary key, link text marcher(10), linker archer(40), parentinventorynavigationid int null references inventory navigation(inventorynavigationid) ) insert into inventory navigation values (1,'first','http://1st',null) ,(2,'second','http://2nd',1) ,(3,'third','http://3rd',1) ,(4,'fourth','http://4th',2) ,(5,'fifth','http://5th',2) ,(6,'sixth','http://6th',2) ,(7,'seventh','http://7th',6) ,(8,'eighth','http://8th',7) company.com has additionally requested that you write a query to list all inventory references which has more than two levels from the root node ensuring the query produces the results below: link text linker distancefromroot ---------- -------------------------- ---------------fourth http://4th 2 fifth http://5th 2 sixth http://6th 2 seventh http://7th 3 eighth http://8th 4 as a result of the additional request you decided to write the query shown below: with display hierarchy as (select link text, linker, inventorynavigationid, parentinventorynavigationid, 0 as distancefromroot from inventory navigation where parentinventorynavigationid is null union all select inventorynavigation.linktext, inventorynavigation.linkurl, inventorynavigation.inventorynavigationid, inventorynavigation.parentinvnetorynavigationid, dh.distancefromroot + 1 as distancefromroot from inventory navigation inner join display hierarchy dh on inventorynavigation.parentinvnetoryenavigationid = dh.inventorynavigationid) select link text, linker, distancefromroot from display hierarchy company.com has finally requested that you have the where clause appended to the query. what should you do? A. you should consider making use of the clause below: where distancefromroot in (2,3)
Page 65 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

B. you should consider making use of the clause below: where distancefromroot =2 C. you should consider making use of the clause below: where distancefromroot >= 2 D. you should consider making use of the clause below: where distancefromroot < 2 Answer: C Question: 146 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables named client and inventory order. company.com is aware that the client table has 1100 clients of which only 800 clients have orders in the inventory order table. during the course of the day you receive instruction from company.com to execute the query shown below to list the clients with at least one sale: select * from client where client.clientid in (select client.clientid from inventory order)company.com has additionally requested that you verify the results of running the query. what would the result be? A. the result of executing the query in the question would return 1100 rows in the client table. B. the result of executing the query in the question would return 800 rows in the client table matching rows in the inventory order table. C. the result of executing the query in the question would return a warning message. D. the result of executing the query in the question would return no rows. Answer: A Question: 147 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables named staff and staff territory. during the course of the day you receive instruction from company.com to have sample data created using a Cartesian product containing the data from the staff and staff territory tables. what should you do? A. you should consider making use of the code segment below: select p.staffid, tonnage as [territory] from staff. staff p inner join staff.staffterritory t on p.territoryid = t.territoryid B. you should consider making use of the code segment below: select p.staffid, tonnage as [territory] from staff. staff p full join staff.staffterritory t on p.territoryid = t.territoryid C. you should consider making use of the code segment below: select p.staffid, tonnage as [territory] from staff. staff p cross join staff.staffterritory t where p.territoryid = t.territoryid D. you should consider making use of the code segment below:
Page 66 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

select p.staffid, tonnage as [territory] from staff. staff p cross join staff.staffterritory t Answer: D Question: 148 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables named client and inventory order. during the course of the day you receive instruction from company.com to have all the company.com clients identified which never made purchases and only placed orders with the order total less than 80. what should you do? A. you should consider making use of the query below: select * from client where 80 > all (select order total from inventory order where client.clientid = inventoryorder.clientid) B. you should consider making use of the query below: select * from client where exists (select inventoryorder.clientid from inventory order where client.clientid = inventoryorder.clientid and inventoryorder.ordertotal <= 80) C. you should consider making use of the query below: select * from client where 80 > some (select order total from inventory order where client.clientid = inventoryorder.clientid) D. you should consider making use of the query below: select * from client where 80 > (select max(order total) from inventory order where client.clientid = inventoryorder.clientid) Answer: A Question: 149 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. the inventory database contains two tables named clients and orders. company.com has recently requested that you develop a select statement which exposes the data as a valid well-formed xml document which has the data attribute-based and the order data xml nested in the client data xml. what should you do? A. you should consider making use of the transact-sql statement below: select c.contactname, o.orderdate, o.requireddate
Page 67 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

from clients c inner join orders o on c.clientid = o.clientid for xml path('contactorderdate') B. you should consider making use of the transact-sql statement below: select c.contactname, o.orderdate, o.requireddate from clients c inner join orders o on c.clientid = o.clientid for xml auto C. you should consider making use of the transact-sql statement below: select c.contactname, o.orderdate, o.requireddate from clients c inner join orders o on c.clientid = o.clientid for xml raw('contact'), root('contactorderdate') D. you should consider making use of the transact-sql statement below: select c.contactname, o.orderdate, o.requireddate from clients c inner join orders o on c.clientid = o.clientid for xml auto, root('contactorderdate') Answer: D Question: 150 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which has an inventory table with a full-text catalog and contains the productname and description columns. company.com has additionally used a full-text thesaurus to expand common product terms. during the course of the day you receive instruction from company.com to have a full-text query developed which will match only the exact word in the search as well as the meaning. what should you do? A. you should consider making use of the transact-sql statement below: select * from inventory where description like '%product%' B. you should consider making use of the transact-sql statement below: select * from inventory where freetext (*, 'product')) C. you should consider making use of the transact-sql statement below: select * from inventory where contains (*, 'formsof(inflectional, product)') D. you should consider making use of the transact-sql statement below: select * from inventory where contains (*, 'product') Answer: B Question: 151 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to write a query
Page 68 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

which list the highest 100 different amounts of product prices as donations for charity. you have started and wrote the query shown below: (line numbers are included as reference only) 01 select * 02 from (select inventory.inventoryid, sum(total due) as total given, 03 04 from inventory 05 join product order 06 on inventory.inventoryid = productorder.inventoryid 07 group by inventory.inventoryid) as donationstofilter 08 where filter criteria <= 100 company.com has additionally requested that you add the final code segment to the query. what should you do? A. you should consider making use of the transact-sql statement below at line 03: row number() over (order by sum(total due) desc) as filter criteria B. you should consider making use of the transact-sql statement below at line 03: dense rank() over (order by sum(total due) desc) as filter criteria C. you should consider making use of the transact-sql statement below at line 03: rank() over (order by sum(total due) desc) as filter criteria D. you should consider making use of the transact-sql statement below at line 03: stile(100) over (order by sum(total due) desc) as filter criteria Answer: B Question: 152 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables nameddob.currentinventory and dbo.archiveinventory. during the course of the day you decided to develop the query statement shown below: select inventoried, name from dbo.currentinventory union all select inventoried, name from dbo.archiveinventory; company.com has recently requested that you identify the list of products that would-be produced by the query. what should you do? A. the query written would have the matching inventoried and name in dbo.currentinventory or dbo.archiveinventory. B. the query written would have the inventory which appears in dbo.currentinventory or dbo.archiveinventory would be listed in both tables multiple times. C. the query written would have the inventory appearing in dbo.currentinventory or dbo.archiveinventory but not in both tables. D. the query written would have the inventory which appears in dbo.currentinventory or dbo.archiveinventory would be listed in both tables once. Answer: B Question: 153 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database containing a table named products which has 2000 rows which has the column be deleted set to 1. during the course of the day you receive instruction from company.com to write a transact-sql batch which would delete exactly 1000 rows. what should you do? A. you should consider making use of the transact-sql batch below: delete top ((select count(*) from dbo.products
Page 69 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

where be deleted = 1)) w from dbo.products w where w.bedeleted = 1; B. you should consider making use of the transact-sql batch below: declare @totalrowcount int = 0; while (@totalrowcount <= 1000) begin delete top (10) dbo.products where be deleted = 1; set @totalrowcount += @@row count; end C. you should consider making use of the transact-sql batch below: delete top (1000) dbo.products where be deleted = 1; D. you should consider making use of the transact-sql batch below: declare @batch size int = 10; while (@batch size = 10) delete top (@batch size) dbo.products where be deleted = 1; Answer: C Question: 154 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a column named contacts which stores numbers as marcher(20). during the course of the day you receive instruction from company.com to develop a query which would return the first three characters of the contact number. what should you do? A. you should consider making use of the expression left(contact number, 3). B. you should consider making use of the expression substring (contact number, 3, 1). C. you should consider making use of the expression substring(contact number, 3, 3) D. you should consider making use of the expression char index('[0-9][0-9][0-9]', contact number, 3). Answer: A Question: 155 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named product.inventoryid which is defined as an identity(1,1) with an order date default value of 1. during the course of the day you receive instruction from company.com to develop a query which would insert a new order into the product table for predicted 45 which uses today's date with a cost of 100.00. what should you do? A. you should consider making use of the code segment below: insert into product (inventoried, predicted, order date, cost) values (1, 45, default, 100.00); B. you should consider making use of the code segment below: insert into product (inventoried, predicted, order date, cost) values (1, 45, current timestamp, 100.00);
Page 70 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

C. you should consider making use of the code segment below: insert into product (predicted, order date, cost) values (45, default, 100.00); D. you should consider making use of the code segment below: insert into product (predicted, order date, cost) values (45, current timestamp, 100.00); Answer: D Question: 156 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named products which requires all inactive product rows to be deleted. during the course of the day you receive instruction from company.com to develop the stored procedure for deleting the rows as shown below: (line numbers are included for reference only.) 01 begin try 02 declare @row count int = 1000 03 while @row count = 1000 04 begin 05 delete top (1000) from products where status = 'inactive'; 06 set @row count = @@row count 07 ... 08 end 09 end try 10 begin catch 11 print error message() 12 end catch company.com has additionally requested that you insert a transact-sql statement which notifies you immediately after each batch row is deleted. what should you do? A. you should consider using the transact-sql statement below at line 07: raiser or ('deleted %i rows', 6, 1, @row count) B. you should consider using the transact-sql statement below at line 07: raiser or ('deleted %i rows', 16, 1, @row count) C. you should consider using the transact-sql statement below at line 07: raiser or ('deleted %i rows', 11, 1, @row count) with no wait D. you should consider using the transact-sql statement below at line 07: raiser or ('deleted %i rows', 10, 1, @row count) with no wait Answer: D Question: 157 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database. during the course of the day you receive instruction from company.com to develop a transact-sql statement which would have the inventory listed which has been sold to less than 20 customers. what should you do? A. you should consider writing the transact-sql statement below: select * from (select predicted, rank() over (order by custom rid desc) as rnk
Page 71 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

from sales) s where s.rnk <= 20; B. you should consider writing the transact-sql statement below: select predicted, count(distinct custom rid) as customer count from sales group by predicted having count(distinct custom rid) < 20; C. you should consider writing the transact-sql statement below: select predicted, count(*) as customer count from sales group by predicted, custom rid having count(*) < 20; D. you should consider writing the transact-sql statement below: select predicted, custom rid, count(distinct custom rid) as customer count from sales group by predicted, custom rid having count(distinct custom rid) < 20; Answer: B Question: 158 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named products. during the course of the day you receive instruction from company.com to increase the product prices for the vendor wetland industries by 15 percent whilst ensuring that a list of products and updates prices are returned. what should you do? A. you should consider making use of the code segment below: update product set price = price * 1.15 output inserted.productname, inserted. price where product.vendorname = 'wetland industries' B. you should consider making use of the code segment below: update product set price = price * 1.15, vendor name = 'waylaid industries' output inserted.productname, inserted. price C. you should consider making use of the code segment below: update product set price = price * 1.15 output inserted.productname, deleted. price where product.vendorname = 'waylaid industries' D. you should consider making use of the code segment below: update product set price = price * 1.15, product name = product name where product.vendorname = 'wetland industries' Answer: A Question: 159 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named products which has a column named product title and description which has a full-text index on the columns. during the course of the day you receive instruction from company.com to write a query which returns the rows from the table in which the word wetland exists in either column. what should you do? A. you should consider making use of the code segment below: select * from products where product title = '%wetland%' or description = '%wetland%' B. you should consider making use of the code segment below: select * from products where product title like '%wetland%' C. you should consider making use of the code segment below: select * from products where free text(producttitle,'weyland') D. you should consider making use of the code segment below: select * from products where free text(*,'wetland') Answer: D
Page 72 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 160 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database containing two tables named products and discounts and shares a foreign key relationship which has cascade delete enabled. during the course of the day you receive instruction from company.com to have all the records removed from the products table. what should you do? A. you should consider writing the transact-sql statement delete from discounts. B. you should consider writing the transact-sql statement delete from products. C. you should consider writing the transact-sql statement truncate table products. D. you should consider writing the transact-sql statement drop table products. Answer: B Question: 161 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named products with a primary key predicted populated using the identity property. company.com is aware that the products table is related to the product line table. during the course of the day you decided to have all the constraints removed from the products table during a data load to increase load speed. during your maintenance you have discovered that the constraints were removed with a row with predicted = 10. company.com wants you to have the row re-inserted into the products able using the same predicted value. what should you do? A. you should consider writing the transact-sql statement below: alter table product; alter column predicted int; insert into product (predicted, ... values (10, ... B. you should consider writing the transact-sql statement below: insert into product (predicted, ... values (10, ... C. you should consider writing the transact-sql statement below: alter database inventory set single user; insert into product (predicted, ... values (10, ... alter database inventory set multi-user; D. you should consider writing the transact-sql statement below: set identity insert product on; insert into product (predicted, ... values (10, ... set identity insert product off; Answer: D Question: 162 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database for weyland industries. during the course of the day you receive instruction from company.com to move data that is older that 20 days from the inventory databases table named main inventory to the table named archive inventory. what should you do? A. you should consider making use of the code segment below: delete from main inventory output deleted.* into archive inventory where record date < date add(d,-20,getdate()) B. you should consider making use of the code segment below:

Page 73 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

insert into archive inventory select * from main inventory where record date < date add(d,20,getdate()) delete from main inventory C. you should consider making use of the code segment below: delete from main inventory output deleted.* where record date < date add(d,-20,getdate()) D. you should consider making use of the code segment below: insert into archive inventory select * from main inventory where record date < date add(d,20,getdate()) Answer: A Question: 163 you work as a network database administrator at company.com in London. The company.com network currently makes use of microsoft sql server 2008 as their database management solution. at present company.com makes use of a database server named -db01 which has four quad-core processors and 4gb of ram. -db01 is currently used for hosting the inventory database. during the course of the day you receive instruction from company.com to have complex queries executed on -db01 whilst ensuring that the query only uses one processor core without impacting the other queries. what should you do? A. you should consider making use of the option (maxrecursion 1) option. B. you should consider making use of the option (maxdop 1) option. C. you should consider making use of the option (recompile) option. D. you should consider making use of the option (fast 1) option. Answer: B Question: 164 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains the rows shown below in the client table: customer status ------------- ----------1 active 2 active 3 inactive 4 null 5 dormant 6 dormant during the course of the day you receive instruction from company.com to write the query shown below to return the clients which do not have null or 'dormant' for their status: select * from client where status not in (null, 'dormant') company.com wants you to determine the results that would be returned from executing the query. what would the result be? A. the query would return the result shown below: client status ------------- ----------B. the query would return the result shown below: client status ------------- ----------1 active 2 active 3 inactive C. the query would return the result shown below: client status
Page 74 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

------------- ----------1 active 2 active 3 inactive 4 null D. the query would return the result shown below: client status ------------- ----------1 active 2 active 3 inactive 4 null 5 dormant 6 dormant Answer: A Question: 165 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. company.com has recently requested that you create the transact-sql statement shown below: declare @client demographics xml set @client demographics=n' <client demographics> <client cliental="1" age="21" education="high school"> <isteadrinker>0</isteadrinker> </client> <client cliental="2" age="27" education="college"> <isteadrinker>1</isteadrinker> <is friendly>1</is friendly> </client> <client cliental="3" age="35" education="unknown"> <isteadrinker>1</isteadrinker> <is friendly>1</is friendly> </client> </client demographics>' declare @outputageofteadrinkers xml set @outputageofteadrinkers = @clientdemographics.query(' for $output in /child::clientdemographics/child::client[ ( child::isteadrinker[1] cast as xs:boolean )] return <teadrinkingclient> { $output/attribute: age \} </teadrinkingclient>') select @outputageofteadrinkers during the course of the day you receive instruction from company.com to determine the results of executing the query. what would the returned results be? A. you should prepare to receive the results below: <client demographics> <client> <teadrinkingclient age="27" /> </client> <client> <teadrinkingclient age="35" /> </client> </client demographics> B. you should prepare to receive the results below:
Page 75 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

<client demographics> <client> <teadrinkingclient age="21" /> </client> </client demographics> C. you should prepare to receive the results below: <teadrinkingclient age="27" /> <teadrinkingclient age="35" /> D. you should prepare to receive the results below: <teadrinkingclient age="21" /> Answer: C Question: 166 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables namedinventory.productorderdetails and inventory.productorderheader. during the course of the day you receive instruction from company.com to have the discount amounts updated for the sales of a specific staff member whilst setting the unitpricediscount ro.1 for the entries in inventory.productorderdetail which correspond only to staffpersonid 180. what should you do? A. you should consider making use of the transact-sql statement below: update inventory.productorderdetail set unitpricediscount = .1 from inventory.productorderheader h where h.staffpersonid = 180; B. you should consider making use of the transact-sql statement below: update inventory.productorderdetail set unitpricediscount = .1 from inventory.productorderdetail d where exists ( select * from inventory.productorderheader h where h.staffpersonid = 180); C. you should consider making use of the transact-sql statement below: update sales.salesorderdetail set unitpricediscount = .1 where exists ( select * from inventory.productorderheader h where h.staffpersonid = 180); D. you should consider making use of the transact-sql statement below: update d set unitpricediscount = .1 from inventory.salesorderdetail d inner join inventory.productorderheader h on h.productorderid = d.productorderid where h.staffpersonid = 180; Answer: D Question: 167 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains two tables named staff.currentstaff and staff.newroster. during the

Page 76 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

course of the day you receive instruction from company.com to write a merge statement meeting the requirements below: 1. you should have new staff inserted into the staff.currentstaff table for the upcoming year not the current year. 2. you should have the staff information updated in staff.currentstaff for the staff currently employed and remains the next year. 3. you should also have the staff deleted from staff.currentstaff who leaves the company at the end of the year. what should you do? A. you should consider making use of the transact-sql statement below: merge staff.currentstaff as t using staff.newroster as s on s.lastname = t.lastname and s.firstname = t.firstnam when matched then update set address = s.address, age = s.age when not matched by target then insert (last name, first name, address, age) values (s.lastname, s.firstname, s.address, s.age) when not matched by source then delete; B. you should consider making use of the transact-sql statement below: | merge staff.currentstaff as t using staff.newroster as s on s.lastname = t.lastname and s.firstname = t.firstname when matched and not tatters = s.address and not t.age = s.age then update set t.age = s.age, tatters = s.address when not matched by target then insert (last name, first name, address, age) values (s.lastname, s.firstname, s.address, s.age) when not matched by source then delete; C. you should consider making use of the transact-sql statement below: merge staff.currentstaff as t using staff.newroster as s on s.lastname = t.lastname and s.firstname = t.firstname when matched and not tatters = s.address or not t.age = s.age then update set tatters = s.address, t.age = s.age when not matched then insert (last name, first name, address, age) values (s.lastname, s.firstname, s.address, s.age) when matched then delete; D. you should consider making use of the transact-sql statement below: merge staff.currentstaff as t using staff.newroster as s on s.lastname = t.lastname and s.firstname = t.firstname when matched then delete when not matched then insert (last name, first name, address, age) values (s.lastname, s.firstname, s.address, s.age) when not matched by source then update set address = tatters, age = t.age; Answer: A Question: 168 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to create a query which allows ranking the total sales for each staff member into four groups which would have the first 25% of results in kinggroup1 with the next 25% in kinggroup2, another 25% in kinggroup3 and the final 25% in kinggroup4. what should you do? A. you should consider having the transact-sql statement below used: ntile(25) B. you should consider having the transact-sql statement below used: ntile(4) C. you should consider having the transact-sql statement below used: ntile(100) D. you should consider having the transact-sql statement below used:
Page 77 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

ntile(1) Answer: B Question: 169 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have a query written for a company named wetland industries which returns a list of product inventory which grossed more than $25,000.00 during the 2009 financial year. company.com has additionally requested that you insert the filter expression below into the query by selecting the clause to insert in the expression: sum([order details].unit price * [order details].quantity) > 25000 what should you do? A. you should consider making use of the where clause. B. you should consider making use of the having clause. C. you should consider making use of the group by clause. D. you should consider making use of the on clause. Answer: B Question: 170 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named employed. During the course of the day you receive instruction from company.com to identify the managers to which the each employed employee reports to using the query below: select e.emloyeename as [employee name], s.employeename as [manager name] from employed e company.com has additionally requested that you ensure the query returns a list of the employed employees and respective managers. what should you do? A. you should consider making use of the join clause below to complete the query: right join employed s on e.reportsto = s.employeeid B. you should consider making use of the join clause below to complete the query: inner join employed s on e.employedid = s.employeeid C. you should consider making use of the join clause below to complete the query: left join employed s on e.reportsto = s.employeeid D. you should consider making use of the join clause below to complete the query: left join employed s on e.employeeid = s.employeeid Answer: C Question: 171 you work as a network database administrator at company.com in London. thecompany.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have the date and time settings displayed using the new Zealand offset for a customer wetland industries since company.com uses the London offset. what should you do? A. you should consider making use of the todatetimeoffset function. B. you should consider making use of the date add function. C. you should consider making use of the switch offset function.
Page 78 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

D. you should consider making use of the convert function. Answer: C Question: 172 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing two tables named inventory and new inventory which have identical structures. you have recently decided to develop the query shown below: (line numbers are included for reference only) 01 select product, description 02 from dbo.products 03 04 select product, description 05 from dbo.newproducts during the course of the day you receive instruction from company.com to make use of the proper transact-sql operator at line 03 to display rows existing in both tables. what should you do? A. you should consider making use of the union all transact-sql operator. B. you should consider making use of the intersect transact-sql operator. C. you should consider making use of the union transact-sql operator. D. you should consider making use of the except transact-sql operator. Answer: B Question: 173 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. company.com has created two tables named inventory.productorderheader and personal. staff. during the course of the day you receive instruction from company.com to have a query written which would return the inventoryorderid and personalstaffnamewhilst having the order date greater than 20091225. company.com additionally requested that you have the personalstaffname made by concatenating the columns first name and last name from the table named personal. staff whilst ensuring that the data returned is stored in alphabetical order. what should you do? A. you should consider using the transact-sql statement below: Select inventoryorderid, first name + ' ' + last name as personalstaffname from inventory.productorderheader h join personal. staff p on p.businessentityid = h.personalstaffid where order date > '20091225' order by first name asc, last name asc B. you should consider using the transact-sql statement below: select inventoryorderid, first name + ' ' + last name as personalstaffname from inventory.productorderheader h join personal. staff p on p.businessentityid = h.personalstaffid where order date > '20091225' order by first name desc, last name desc C. you should consider using the transact-sql statement below: select inventoryorderid, first name + ' ' + last name as personalstaffname from inventory.productorderheader h join personal. staff p on p.businessentityid = h.personalstaffid where order date > '20091225' order by personalstaffname desc D. you should consider using the transact-sql statement below:

Page 79 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

select inventoryorderid, first name + ' ' + last name as personalstaffname from inventory.productorderheader h join personal. staff p on p.businessentityid = h.personalstaffid where order date > '20091225' order by personalstaffname asc Answer: D Question: 174 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. the inventory database currently has a table named king categories containing the subcategories for, vegetables, meat, and fruit.company.com informed you that an additional table named inventory containing only products from the subcategories vegetables and fruit. during the course of the day you receive instruction to write the query below from company.com: select snare, p.name as inventory name from subcategories s outer apply (select * from products where pr.subcategoryid = s.subcategoryid) p where snare is not null; company.com has additionally requested that you determine what the result would be from executing the query. what result would be returned by the query? A. name product name vegetables carats, vegetables peas, vegetables cabbage, m vegetables cabbage, l fruit apples, s fruit apples, m fruit apples, l meat null null null B. name product name vegetables carats, vegetables peas, vegetables cabbage, m vegetables cabbage, l fruit apples, s fruit apples, m fruit apples, l meat null C. name product name vegetables carats, vegetables peas, vegetables cabbage, m vegetables cabbage, l fruit apples, s fruit apples, m fruit apples, l D. name product name vegetables carats, vegetables peas, vegetables cabbage, m vegetables cabbage, l fruit apples, s fruit apples, m fruit apples, l
Page 80 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

null carats, null carats, null cabbage, m null cabbage, l null apples, s null apples, m null apples, l helmets null null null Answer: B Question: 175 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to verify if the month of December would contain 31 days within the clause that is provided to you. what should you do? A. you should consider making use of the table-valued function object. B. you should consider making use of the stored procedure object. C. you should consider making use of the dml trigger object. D. you should consider making use of the scalar-valued function object. Answer: D Question: 176 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing two table named inventory category and inventory subcategory. during the course of the day you receive instruction from company.com to develop a query which would return a list of product categories which contain more than ten sub-categories. what should you do? A. you should consider making use of the query below: select [name] from inventory subcategory where inventorycategoryid not in (select inventorycategoryid from inventory category) group by [name] having count(*) > 10 B. you should consider making use of the query below: select [name] from inventory subcategory where inventorycategoryid in ( select inventorycategoryid from inventory category) group by [name] having count(*) > 10 C. you should consider making use of the query below: select [name] from inventory category c where not exists (select inventorycategoryid from inventory subcategory where inventorycategoryid = c.inventorycategoryid group by inventorycategoryid having count(*) > 10) D. you should consider making use of the query below: select [name] from inventory category c where exists (select inventorycategoryid from inventory subcategory where inventorycategoryid = c.inventorycategoryid group by inventorycategoryid having count(*) > 10)

Page 81 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: D Question: 177 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named staff which is used to insert the staffed of each employee's manager in the fingerpost column. during the course of the day you receive instruction to write a recursive query producing a list of employees and managers whilst ensuring that the query includes the employee's level in the company. you later decided to produce the query shown below: (line numbers are included for reference only) 01 with employee list (staffed, full name, manager name, level) 02 as ( 03 04 ) 05 select staffed, full name, manager name, level 06 from employee list; company.com has additionally requested that you have the required code segments inserted at line 3.what should you do? A. you should consider having the code segment below inserted at line 3: select staffed, full name, '' as [reportsto], 1 as [level] from employee union all select emp.staffid, emp.fullname, mgr.fullname, mgr.level + 1 from employee list mgr join employee emp on emp.reportsto = mgr.staffid B. you should consider having the code segment below inserted at line 3: select staffed, full name, '' as [reports to], 1 as [level] from employee union all select emp.staffid, emp.fullname, mgr.fullname, 1 + 1 as [level] from employee emp left join employee mgr on emp.reportsto = mgr.staffid C. you should consider having the code segment below inserted at line 3: select staffid, full name, '' as [reportsto], 1 as [level] from employee where reportsto is null union all select emp.staffid, emp.fullname, mgr.fullname, mgr.level + 1 from employee list mgr join employee emp on emp.reportsto = mgr.staffid D. you should consider having the code segment below inserted at line 3: select staffid, full name, '' as [reportsto], 1 as [level] from employee where reportsto is null union all select emp.staffid, emp.fullnname mgr.fullname, 1 + 1 as [level] from employee emp join employee mgr on emp.reportsto = mgr.staffid Answer: C Question: 178 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which has two view named inventorysalessumary and inventory customer summary which are defined as shown below: create view inventory.salessummary as select custom rid, sum(sales total) as overall total from inventory. sales order group by custom rid go create view inventory.customersummary as select customer. name, salessummaryoverall.overalltotal,(select avg(overall total) from inventory.salessummary where inventorysalessummary.customerid = customer.customerid) as avgoveralltotal, (select max(overall total) from inventory.salessummary where inventory sales summary.customerid = customer.customerid) as maxoveralltotal, from inventory. Customer left outer join inventory. inventory.salessummary on salessummarybyyear.customerid = customer. custom rid go during the course of the day you receive instruction from company.com to have the
Page 82 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

inventory.salessummary view modified to remove references to other views whilst identifying the feature which should be used in the modified version. what should you do? A. you should consider making use of the temporary tables feature. B. you should consider making use of the user-defined table types feature. C. you should consider making use of the common table expressions feature. D. you should consider making use of the table variables feature. Answer: C Question: 179 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have seventeen billion rows added to the database using a query whilst ensuring that you have the first 100 rows returned as quickly as possible. what should you do? A. you should consider making use of the table hint(table, index(100)) query hint. B. you should consider making use of the optimize for @rows=100 query hint. C. you should consider making use of the maxdop 100 query hint. D. you should consider making use of the fast 100 query hint. Answer: D Question: 180 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have a query written which makes use of the ranking function and returns the sequential number of a row within the partition of a result set which naturally starts at 1 indicating the first row in each partition. what should you do? A. you should consider making use of the ntile(10) transact-sql statement. B. you should consider making use of the rank transact-sql statement. C. you should consider making use of the row number transact-sql statement. D. you should consider making use of the dense rank transact-sql statement. Answer: C Question: 181 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. company.com has recently noticed that a specific set of parameter values from a query executes quickly and slow the other times. during your routine maintenance tasks you discovered that 85 percent of the rows in the king address table use the same value of the city. the query in question is shown below: select addressed, addressline1, city, postal code from staff. address where city = @city name and postal code = @postal code company.com has additionally requested that you consider usingquery hints for the specific set of parameter values to result in a consistent query execution time. what should you do? A. you should consider making use of the parameterization forced query hint.
Page 83 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

B. you should consider making use of the maxdop query hint. C. you should consider making use of the fast query hint. D. you should consider making use of the optimize for query hint. Answer: D Question: 182 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 which has the collation set to sql_latin_general_cp1_ci_as hosting the inventory database which has a collation set to sql_scandinavian_cp850_ci_as. during the course of the day you receive instruction from company.com to create and populate a temporary table #product from dbo.inventory in the inventory database using the statement shown below: use mydb; create table #product (last name nchar(128));insert into #product select last name from dbo.inventory; you have later decided to execute the command below: select * from dbo.product a join #product b on a.lastname = b.lastname; you have later discovered that executing the command returns the error message shown below: "cannot resolve the collation conflict between "sql_latin1_general_cp1_ci_as" and"sql_scandinavian_cp850 _ci_as" in the equal to operation"company.com wants you to ensure that you are able to resolve the conflict. what should you do? A. you should consider making use of the transact-sql statement below: create table #product (last name marcher(128) collate sql_latin1_general_cp1_ci_as); B. you should consider making use of the transact-sql statement below: create table tm product (last name marcher(128) collate sql_latin1_general_cp1_ci_as); C. you should consider making use of the transact-sql statement below: create table #product (last name marchers(128) collate database default); D. you should consider making use of the transact-sql statement below: create table #product (last name marcher(128) sparse); Answer: C Question: 183 you work as a network database administrator at company.com. the company.com network currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have e-mail sent from a stored procedure since you failed to install a mapi client. what should you do? A. you should consider making use of the xp_startmail stored procedure for sending e-mail without a mapi client. B. you should consider making use of the sp_send_dbmail stored procedure for sending e-mail without a mapi client. C. you should consider making use of the sysmail_start_sp stored procedure for sending e-mail without a mapi client. D. you should consider making use of the xp_sendmail stored procedure for sending e-mail without a mapi client. Answer: B Question: 184 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory
Page 84 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

database which uses database mail. during the course of the day you receive instruction from company.com to have e-mail notifications delivered. testkin.com has recently discovered that a user named Rory allen does not receive the e-mail notifications. company.com wants you to verify if the e-mail notifications sent by database mail is successful. what should you do? A. you should consider making use of the msdb.dbo.sysmail_unsentitems object from the msdb database. B. you should consider making use of the msdb.dbo.sysmail_faileditems object from themsdb database. C. you should consider making use of the msdb.dbo.sysmail_sentitems object from themsdb database. D. you should consider making use of the msdb.dbo.sysmail_event_log object from the msdb database. Answer: B Question: 185 you work as a network database administrator at company.com. the company.comnetwork currently makes use of microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named product. During the course of the day you receive instruction to open a microsoft windows power shell session at the location below using the sql server windows power shell provider. Ps sqlserver:\sql\contoso\default\databases\reportserver\tables\dbo.inventory\columns>. company.com has additionally requested that you query the columns in the table using the sql server windows power shell provider. what should you do? A. you should consider making use of the get-item camlet. B. you should consider making use of the get-item property camlet. C. you should consider making use of the get-child item camlet. D. you should consider making use of the get-location camlet. Answer: C Question: 186 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 that is configured to host the inventory database. during the course of the day you receive instruction from company.com to create a service broker queue and you wrote the transact-sql statement below: create queue inventory request queue with retention = off, activation ( procedure_ name = dbo. inventory request process, max_ queue_ readers = 5, execute as self ); company.com has additionally requested that you modify the service broker queue preventing the processing of received messages. what should you do? A. you should consider making use of the transact-sql statement below: alter queue inventory request queue with activation (execute as owner); B. you should consider making use of the transact-sql statement below: alter queue inventory request queue with status = off; C. you should consider making use of the transact-sql statement below:
Page 85 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

alter queue inventory request queue with retention = on; D. you should consider making use of the transact-sql statement below: alter queue inventory request queue with activation (status = off); Answer: D Question: 187 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory database containing two tables named products and inventory archive which contains historical product data. during the course of the day you receive instruction from company.com to configure change tracking on the products table with the minimum valid version of the products table 10. company.com has additionally requested that you write a query which will be used to export only the products data which changes since version 10 with the primary key of deleted rows. what should you do? A. you should consider making use of the code segment below: from products inner join change table (changes inventory archive, 10) as c ... B. you should consider making use of the code segment below: from products right join change table (changes inventory archive, 10) as c ... C. you should consider making use of the code segment below: from products right join change table (changes products, 10) as c ... D. you should consider making use of the code segment below: from products inner join change table (changes product, 10) as c ... Answer: C Question: 188 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 that is configured to host the inventory database. during the course of the day you receive instruction from company.com to have a table named inventory. Product order which has change tracking enabled modified for a company named wetland industries to have the change tracking disabled prior to modifying the inventory. Product order table. what should you do? A. you should consider making use of the transact-sql statement below: alter table inventory. Product order disable change_ tracking B. you should consider making use of the transact-sql statement below: alter database inventory set change_ tracking = off C. you should consider making use of the transact-sql statement below: exec sys. sp_ cdc_ disable_ table @source_ schema = n' inventory', @source_ name = n' product order', @capture_ instance = n'inventory_ product order' D. you should consider making use of the transact-sql statement below: exec sys.sp_cdc_disable_db Answer: A Question: 189 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named-db01 hosting the inventory
Page 86 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

database containing a table named inventory. products which has the columns inventoried, name, size and category. you have recently developed a variable named @xml using the value below: <root> <category name="fishing rods" /> <category name="hooks" /> <category name="sinkers" /> </root> during the course of the day you receive instruction from company.com to develop a query which would have the products listed in the inventory. product table matching the categories listed in the xml document. what should you do? A. you should consider making use of the query below: with xmltable as ( select s.value('@category','varchar(20)') as category from @xml.nodes('//category') as x(s) ) select p.inventoryid, p.name, p.size, p.category from inventory. product p B. you should consider making use of the query below: select p.inventoryid, p.name, p.size, p.category from inventory. product p cross apply @xml.nodes('//category') as x(s) C. you should consider making use of the query below: with xmltable as (select s.value('@name','varchar(20)') as category from @xml.nodes('//category') as x(s) ) select p.inventoryid, p.name, p.size, p.category from inventory. product p inner join mutable x on p.category = x.category D. you should consider making use of the query below: select p. inventoried, p. name, p. size, p.category from inventory. product p outer apply @xml.nodes('//category') as x(s) Answer: C Question: 190 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named clients that has a xml column named locations which stores an xml fragment containing the details of one or more locations a shown in the example below: <location city="Paris" address="..." phone number="..." /> <location city="Seattle" address="..." phone number="..." /> <location city="Chicago" address="..." phone number="..." /> during the course of the day you receive instruction from company.com to have a query written which would return a row for each client location whilst ensuring that the client name, city and an xml fragment contains the location details. what should you do? (choose two) A. you should consider making use of the query below: Select client name, locations. query('for $i in /location return data($i/@city)'), locations. query('for $i in /location return $i') from client B. you should consider making use of the query below: Select client name, locations. query('for $i in /location return element location {$i/@city, $i}') from client C. you should consider making use of the query below: Select client name, locations. query('data(/location/@city)'), locations. query('/location') from client D. you should consider making use of the query below: Select client name, loc. value('@city','varchar(100)'), loc. query('.') from client cross apply client.locations.nodes ('/location') locs(loc)

Page 87 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: C, D Question: 191 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have sql server profiler used to gather deadlock information whilst ensuring that you are able to capture an xml description of a deadlock. what should you do? A. you should consider making use of the show plan xml event. B. you should consider making use of the lock: deadlock chain event. C. you should consider making use of the deadlock graph event. D. you should consider making use of the lock: deadlock event. Answer: C Question: 192 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database which contains a table named inventory and orders which are related by a foreign key constraint on the inventoried on each table. during the course of the day you receive instruction from company.com to generate a xml structure shown below including all clients and related orders: <root> <client> <client name>client1</client name> <orders> <order><orderdate>1/1/2009</orderdate><ordervalue>422</ordervalue></order> <order><orderdate>4/8/2009</orderdate><ordervalue>300</ordervalue></order> ... </orders> ... </client> <root> what should you do?

A. you should consider making use of the query below: select * from (select client name, null as order date, null as order value from client union all select null, order date, order value from orders) client orders for xml auto, root('root') B. you should consider making use of the query below: select client name, (select order date, order value from orders for xml path('order')) from client for xml path('client'), root('root'), type C. you should consider making use of the query below: select client name, (select order date, order value from orders where orders.clientid = client.clientid for xml path('order'), type) orders from client for xml path('client'), root('root') D. you should consider making use of the query below: select client name, order date, order value from client c join orders o on o.clientid = c.clientid for xml auto, type Answer: C

Page 88 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Question: 193 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have the xml document shown below developed for a company named wetland industries: <inventory export> <inventory price="199">product1</product> <inventory price="299">product2</product> <inventory price="399">product3</product> <inventory price="499">product4</product> </inventory export> what should you do? A. you should consider making use of the query below: select price [@price], product name as [*] from inventory as inventory export for xml auto, elements B. you should consider making use of the query below: select price, product name from inventory for xml auto, root('inventory export') C. you should consider making use of the query below: select price [@price], product name as [*] from inventory for xml path('inventory'),root('inentoryexport') D. you should consider making use of the query below: select price, product name from inventory as inventory export for xml path('inventory') Answer: C Question: 194 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database containing a table named branches containing an xml column named hours open. the opening and closing times of the column are shown below: <hours day of week="Monday" open="7:00" closed="17:00" /> <hours day of week="Tuesday" open="7:00" closed="17:00" /> ... <hours dayofweek="Saturday" open="7:00" closed="17:00" /> during the course of the day you receive instruction from company.com to have a query written which would return the list of open branches and opening times for specific days. what should you do? A. you should consider making use of the code segment below: declare @day archer(10) = 'Tuesday' select branch name, hoursopen.query('data(/hours[@dayofweek=sql:variable("@day")]/@open)') from branches B. you should consider making use of the code segment below: declare @day archer(10) = 'Tuesday' select branch name, hoursopen.value('/hours[1][@dayofweek=sql:variable("@day")]/@open, time') from branches C. you should consider making use of the code segment below: declare @day archer(10) = 'Tuesday' select branch name, hoursopen.value('/hours[1]/@open, time') from branches where hoursopen.exist('/hours[@dayofweek=sql:variable("@day")]') = 1 D. you should consider making use of the code segment below: declare @day varchar(10) = 'Tuesday' select branch name, hoursopen.value('/hours[1]/@open, time') from branches where hoursopen.value('/hours[1]/@dayofweek','varchar(20)') = @day
Page 89 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

Answer: A Question: 195 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have your level of proficiency rated with having additional sql server query techniques used including sub queries, cte queries, ranking functions as well as execution plans. what would your reply be? A. you should inform company.com that your level of proficiency with these tasks is low. B. you should inform company.com that your level of proficiency with these tasks is very high. C. you should inform company.com that your level of proficiency with these tasks is high. D. you should inform company.com that your level of proficiency with these tasks is very low. E. you should inform company.com that your level of proficiency with these tasks is moderate. Answer: B Question: 196 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have the xml schema used to validate the xml data in the database. company.com has additionally requested that you store the xml schema as well. what should you do? A. you should consider using the code segment below: create primary xml index customer schema B. you should consider using the code segment below: create xml schema collection customer schema C. you should consider using the code segment below: create default customer schema as 'xml' D. you should consider using the code segment below: create schema customer schema Answer: B Question: 197 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you received instruction from company.com to have a server side trace created which created 35 trace files. company.com has additionally requested that you load the trace files on your workstation using the database called per data for further analysis by loading three files starting at c:\t-king\trace_32. what should you do? A. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace.trc', 3) B. you should consider using the transact-sql statement below: select * into per data from ( select * from ::fn_trace_gettable ('c:\t-king\trace_32.trc', default) union all select * from ::fn_trace_gettable ('c:\t-king\trace_33.trc', default) union all select * from ::fn_trace_gettable ('c:\t-king\trace_34.trc', default) ) trc C. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace32.trc', default)
Page 90 of 91

Exam Name: Exam Type: Exam Code:

TS: Microsoft SQL Server 2008, Database Development Microsoft 70-433 Total Questions

199

D. you should consider using the transact-sql statement below: select * into per data from ::fn_trace_gettable('c:\t-king\trace_32.trc', 3) Answer: D Question: 198 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -db01 hosting the inventory database. during the course of the day you receive instruction from company.com to have a workload captured and recorded for analysis making use of the database engine tuning advisor (dta). what should you do? A. you should consider making use of the activity monitor. B. you should consider making use of the dta utility. C. you should consider making use of the performance monitor. D. you should consider making use of the sql server profiler. Answer: D Question: 199 you work as a network database administrator at company.com. the company.com network currently makes use of Microsoft sql server 2008 as their database management solution. company.com currently makes use of a database server named -sr01 hosting the inventory database. during the course of the day you receive instruction from company.com to make use of the database engine tuning advisor (dta) to analyze a workload which requires having the recommendations generated saved by the database engine tuning advisor. what should you do? A. you should consider making use of the import session definition command. B. you should consider making use of the preview workload table command. C. you should consider making use of the export session results command. D. you should consider making use of the export session definition command. Answer: C

End of Document

Page 91 of 91