You are on page 1of 10

(70-464) Developing Microsoft SQL Server Databases

QUESTION 1
You have a SQL Server 2012 database named DB1. You have a backup device named Device1.
You discover that the log file for the database is full.
You need to ensure that DB1 can complete transactions.
The solution must not affect the chain of log sequence numbers (LSNs).

Which code segment should you execute?

A. BACKUP LOG DB1 TO Device1 WITH NO_LOG
B. BACKUP LOG DB1 TO Device1
C. BACKUP LOG DB1 TO Device1 WITH NORECOVERY
D. BACKUP LOG D31 TO Device1 WITH TRUNCATE_ONLY

Correct Answer: B
Explanation

Explanation/Reference:

QUESTION 2
You execute the following code:

The execution plan for the query is shown in the exhibit. (Click the Exhibit button.)

Which advanced server option should you modify? A. D. B. Correct Answer: C Explanation Explanation/Reference: QUESTION 3 You have a database for a mission-critical web application.SQL statements dynamically and does not use stored procedures. You need to maximize the amount of memory available for data caching. The application generates all T. scan for Startup Procs B. Allow Triggers to Fire Others . The database is stored on a SQL Server 2012 instance and is the only database on the instance. A. C.You need to prevent the key lookup.

) You need to recommend a solution to reduce the amount of time it takes to execute the query. Enable Contained Databases D. C. Optimize for Ad hoc Workloads Correct Answer: D Explanation Explanation/Reference: QUESTION 4 You have a table named Rooms that contains three columns. Select the BEST answer. Id. (Click the Exhibit button. Include the RoomName column and the Position column in the Room_IX index. A.NOLOCK) query hint. Which tool should you use? A. Data Profile Viewer B. D. You execute the following query: You discover the execution plan shown in the exhibit. You need to identify which parallel execution plans are running in serial. use the WITH (INDEX( Room_IX). Database Engine Tuning Advisor .C. and Position. Create a clustered index for Id. B. Correct Answer: D Explanation Explanation/Reference: QUESTION 5 You have a server that has SQL Server 2012 installed. What should you do? More than one answer choice may achieve the goal. Create a nonclustered index for RoomName.

Replace IX_CustomerName with a clustered index. What should you do? A.1/1) = 'a'. log errors by using trace flag 1222 Correct Answer: A Explanation Explanation/Reference: QUESTION 7 You execute the following code: You need to reduce the amount of time it takes to execute the query. Select the BEST answer. a SQL Server Profiler template C. Database developers report that there are many deadlocks. The solution must meet the following requirements: • Support real-time monitoring. You need to implement a solution to monitor the deadlocks.1) = 'a' with SUBSTRING(CustomerName . Replace LEFT(CustomerName .C. B. log errors by using trace flag 1204 D. • Be enabled and disabled easily. What should you implement? More than one answer choice may achieve the goal. C. A. • Support querying of the monitored data. Extended Events Correct Answer: D Explanation Explanation/Reference: QUESTION 6 You have a database named database1. Replace LEFT(CustomerName . D.1) = 'a' with CustomerName LIKE 'a%'. Correct Answer: A Explanation . an Extended Events session B. Partition the table and use the CustomerName column for the partition scheme. Performance Monitor D.

Table1 is configured as shown in the following table. The solution must ensure that the results can be joined to other tables. Correct Answer: A Explanation Explanation/Reference: QUESTION 9 You have a database that contains a user-defined function named Schema1.Table1 and Schemal. . Schema1. Quantity. and LineTotal columns for all of the items in the OrderDetails table.Udf1 and two tables named Schema1. For a given sales order. you need to retrieve the OrderID. D. C.Explanation/Reference: QUESTION 8 You have a SQL Server 2012 database named database1. The schema for Schema1. B.Table1 has 1 million rows. Which code segment should you execute? A. Database1 contains a table named OrderDetails.Table2.

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. Which query should you use? A. D. C. • The amount of time it takes the query to execute must be minimized. Correct Answer: C Explanation .Schema1. B.

WITH SCHEMABINDING Correct Answer: C Explanation Explanation/Reference: QUESTION 11 You have an application that uses a view to access data from multiple tables. C. D. WITH CHECK OPTION D. B. (Line numbers are included for reference only. Define the view by using the SCHEMABINDING option. Materialize the view. You execute the following code: . 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. WITH ENCRYPTION B. You need to ensure that you can insert rows into the underlying tables by using the view. Correct Answer: C Explanation Explanation/Reference: QUESTION 12 You have a SQL Azure database.Explanation/Reference: QUESTION 10 You have a database hosted on SQL Azure. Which code segment should you add at line 06? A.) You need to ensure that the view can update the data in the table. WITH VIEW_METADATA C. except for the data in Column1. What should you do? A. Create an INSTEAD OF trigger on the view. Define the view by using the CHECK option.

The solution must minimize the disk storage requirements.CustomersByFaxNumber. CREATE INDEX IX_Customers ON Customers (FaxNumber) WITH FILLFACTOR=0 C.Customers table will contain 100. CREATE INDEX IX_Customers ON Customers (CustomerName) INCLUDE (FaxNumber) D. 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. Which code segment should you execute? A. CREATE INDEX IX_Customers ON Customers (FaxNumber) WHERE FaxNumber IS NOT NULL B. CREATE INDEX IX_Customers ON Customers (FaxNumber) E.The Sales. CREATE INDEX IX_Customers ON Customers (FaxNumber) WHERE FaxNumber IS NULL Correct Answer: A Explanation Explanation/Reference: QUESTION 13 You execute the following code: .000 rows.

D.microsoft.You need to select the task that has an IsFinished value of true from the Project that has an Id value of 1. Which code segment should you use? A.aspx QUESTION 14 You run the following code: . Correct Answer: B Explanation Explanation/Reference: http://technet. B.com/en-us/library/ms191474. C.

a Data Definition Language (DDL) trigger E.You need to ensure that the root node of the XML data stored in the Details column is <Order_Details>. a CHECK constraint E. What should you implement? More than one answer choice may achieve the goal. A. a FOREIGN KEY constraint B. a user-defined function is called to validate the row before the row is added to the table. a user-defined data type D. Select the BEST answer. You need to ensure that every time a new row is added to the Orders table. Select the BEST answer. What should you use? More than one answer choice may achieve the goal. a data manipulation language (DML) trigger C. A. an XML schema collection C. a data manipulation language (DML) trigger Correct Answer: B Explanation Explanation/Reference: QUESTION 15 You are creating a table named Orders. a DEFAULT constraint D. an XML index B. a Data Definition Language (DDL) trigger Correct Answer: D .