QUESTION 17
You have a database named database1. Database developers report that there are many deadlocks. You need to implement a solution to monitor the deadlocks. The solution must meet the following requirements:
– Support real-time monitoring.
– Be enabled and disabled easily.
– Support querying of the monitored data.
What should you implement? More than one answer choice may achieve the goal. Select the BEST answer.

QUESTION 18
You have a SQL Server 2012 database named database1. Database1 contains a table named OrderDetails. For a given sales order, you need to retrieve the OrderID, Quantity, and LineTotal columns for all of the items in the OrderDetails table. The solution must ensure that the results can be joined to other tables. Which code segment should you execute?

A. Option A
B. Option B
C. Option C
D. Option D

Answer: A

QUESTION 19
Drag and Drop Question
You are planning two stored procedures named SProc1 and SProc2. You identify the following requirements:
– SProc1 must return a table.
– SProc2 must return a status code.
You need to identify which options must be implemented to meet each stored procedure requirement. Which options should you identify? To answer, drag the appropriate option to the correct requirement in the answer area. (Answer choices may be used once, more than once, or not at all.)

Answer:

QUESTION 20
You have a database that contains a user-defined function named Schema1.Udf1 and two tables named Schema1.Table1 and Schemal.Table2. Schema1.Table1 has 1 million rows. The schema for Schema1.Table1 is configured as shown in the following table:
Schema1.Udf1 was defined by using the following code:
You need to write a query that will contain the following columns:
– Country
– CountryID
– CustomerName
The solution must meet the following requirements:
– Rows must be returned only if the function returns data.
– The amount of time it takes the query to execute must be minimized.
Which query should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Answer: C

QUESTION 21
You have a database hosted on SQL Azure. You are developing a script to create a view that will be used to update the data in a table. The following is the relevant portion of the script. (Line numbers are included for reference only.) You need to ensure that the view can update the data in the table, except for the data in Column1. Which code segment should you add at line 06?

A. WITH ENCRYPTION
B. WITH VIEW_METADATA
C. WITH CHECK OPTION
D. WITH SCHEMABINDING

QUESTION 23
You have a SQL Azure database. You execute the following code:
The Sales.Customers table will contain 100,000 rows. You expect the FaxNumber column to contain a null value for 70 percent of the rows. You need to create an index to support Sales.CustomersByFaxNumber. The solution must minimize the disk storage requirements. Which code segment should you execute?

QUESTION 24
You run the following code:
You need to ensure that the root node of the XML data stored in the Details column is <Order_Details>. What should you implement? More than one answer choice may achieve the goal. Select the BEST answer.

QUESTION 25
Drag and Drop Question
You have a table named Customers that has a clustered index defined on the ID column. You write a script to create a stored procedure. You need to complete the script for the stored procedure. The solution must minimize the number of locks and deadlocks. What should you do? To answer, drag the appropriate option to the correct location in the answer area. (Answer choices may be used once, more than once, or not at all.)

Answer:

QUESTION 26
You are creating a table named Orders. You need to ensure that every time a new row is added to the Orders table, a user-defined function is called to validate the row before the row is added to the table. What should you use? More than one answer choice may achieve the goal. Select the BEST answer.

QUESTION 27
You execute the following code:
You need to create a covering index on UserInfo. Which code segment should you execute?

A. Option A
B. Option B
C. Option C
D. Option D

Answer: D

QUESTION 28
You plan to execute the following code:
You need to identify how many rows will be in dbo.Table1 after you execute the code. How many rows should you identify?

A. 3
B. 2
C. 1
D. 0

Answer: D

QUESTION 29
You have an index for a table in a SQL Azure database. The database is used for Online Transaction Processing (OLTP). You discover that the index consumes more physical disk space than necessary. You need to minimize the amount of disk space that the index consumes. What should you set from the index options?

QUESTION 30
Drag and Drop Question
You execute the following code:
You discover that the Customers table was created in the dbo schema. You need to create a code segment to move the table to another schema named Schema2. What should you create? To answer, drag the appropriate code segments to the correct location in the answer area. (Answer choices may be used once, more than once, or not at all.)

Answer:
Explanation:
Note: ALTER SCHEMA newschema TRANSFER oldschema.TABLE This will transfer the table defined under “oldschema” and transfer it to “newschema”.