Q1. You need to modify usp_SelectSpeakersByName to support server-side paging. The solution must minimize the amount of development effort required.
What should you add to usp_SelectSpeakersByName?
A. A table variable
B. An OFFSET-FETCH clause
C. The ROWNUMBER keyword
D. A recursive common table expression
Answer: B
Explanation:
http://www.mssqltips.com/sqlservertip/2696/comparing-performance-for-different-sql-serverpaging-methods/ http://msdn.microsoft.com/en-us/library/ms188385.aspx http://msdn.microsoft.com/en-us/library/ms180152.aspx http://msdn.microsoft.com/en-us/library/ms186243.aspx http://msdn.microsoft.com/en-us/library/ms186734.aspx http://www.sqlserver-training.com/how-to-use-offset-fetch-option-in-sql-server-order-byclause/-http://www.sqlservercentral.com/blogs/juggling_with_sql/2011/11/30/using-offset-and-fetch/
Q2. You are creating a stored procedure named usp1. Usp1 will create a table that will be used during the execution of usp1. Only usp1 will be allowed to access the table.
You need to write the code required to create the table for usp1. The solution must minimize the need to recompile the stored procedure.
Which code segment should you use to create the table?
A. CREATE TABLE oneTable
B. CREATE TABLE ##oneTable
C. CREATE TABLE #oneTable
D. DECLARE oneTable TABLE
Answer: B
Q3. Topic 8)
You have a SQL Server 2014 database.
You plan to create a stored procedure that will retrieve the following information:
. The XML content of the query plans that is stored in memory . The number of times each query plan is used
You need to identify which dynamic management objects must be used to retrieve the required information for the stored procedure.
Which dynamic management objects should you identify?
To answer, drag the appropriate dynamic management object to the correct requirement in the answer area.
Answer:
Q4. You need to modify the function in CountryFromID.sql to ensure that the country name is returned instead of the country ID.
Which line of code should you modify in CountryFromID.sql?
A. 04
B. 05
C. 06
D. 19
Answer: D
Explanation:
http://msdn.microsoft.com/en-us/library/ms186755.aspx http://msdn.microsoft.com/en-us/library/ms191320.aspx
Q5. 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?
A. STATISTICS_NORECOMPUTE = OFF
B. FILLFACTOR = 80
C. FILLFACTOR = 0
D. STATISTICS_NORECOMPUTE = ON
Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/ms177459.aspx http://msdn.microsoft.com/en-us/library/ms188783.aspx
Q6. You execute the following code: 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. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q7. You need to identify the cause of the page split issues.
Which SQL Server feature should you use?
A. DBCC REINDEX
B. SQL Server Profiler
C. Extended Events
D. DBCC TRACEOFF
Answer: C
46. You need to design a solution that meets the refactoring requirements.
Which type of object should you include in the solution?
A. An indexed view
B. An aggregate function
C. A distributed view
D. A table-valued function
Q8. Topic 8)
You plan to deploy two stored procedures named SP1 and SP2 that read data from the database.
Your company identifies the following requirements for each stored procedure:
. SP1 must allow dirty reads.
. SP2 must place range locks on the data to ensure read consistency.
You need to identify which isolation level you must set for each stored procedure. The solution must minimize the number of locks.
Which isolation level should you identify?
To answer, drag the appropriate isolation level to the correct stored procedure in the answer area. (Answer choices may be used once, more than once, or not at all.)
Answer:
Q9. You are creating a table to support an application that will cache data outside of SQL Server.
The application will detect whether cached values were changed before it updates the
values.
You need to create the table, and then verify that you can insert a row into the table.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/ms182776.aspx http://msdn.microsoft.com/en-us/library/ms187942.aspx http://msdn.microsoft.com/en-us/library/ms190348.aspx
Q10. You use SQL Server 2012 to store data used by an e-commerce application.
You develop a stored procedure named sp1. Sp1 is used to read the price of all the products sold on the e-commerce site.
You need to ensure that sp1 can read data even while another transaction is modifying the price of a product. Sp1 must only read committed data.
Which transaction isolation level should you use in sp1?
A. Serializable
B. Snapshot
C. Repeatable read
D. Read committed
Answer: B
Q11. You plan to migrate an instance of SQL Server 2008 to a new installation of SQL Server 2012.
You need to migrate alerts and e-mail notifications.
Which system stored procedures should you use? (Each correct answer presents part of the solution. Choose all that apply.)
A. sp_syspolicy_create_job
B. sp_add_operator
C. sp_audit_write
D. sp_add_alert
Answer: B,C
Explanation: B: sp_add_operator
Creates an operator (notification recipient) for use with alerts and jobs.
C: sp_audit_write Adds a user-defined audit event to the USER_DEFINED_AUDIT_GROUP. If USER_DEFINED_AUDIT_GROUP is not enabled, sp_audit_write is ignored.
Q12. Your company has a main office in London and a branch office in New York.
Your network contains a server named Server5 that has SQL Server 2012 installed. Server5 contains a database name ContentDB and a table named ContentTable.
You add an additional server named Server9 that runs SQL Server 2012.
You need to create a distributed partitioned view. The solution must minimize the amount of network traffic.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Create the view on Server5.
B. Add Server9 as a linked server.
C. Create the view on Server9.
D. Add the Customers table to Server9.
E. Add Server9 as a Distributor.
F. Remove the Customers table from Server5.
Answer: A,B,C,D
Q13. You need to ensure that usp_AddXMLOrder can be used to validate the XML input from the retailers.
Which parameters should you add to usp_AddXMLOrder on line 04 and line 05? (Each correct answer presents part of the solution. Choose all that apply.)
A. @schema varbinary(100).
B. @items varchar(max).
C. @schema sysname.
D. @items varbinary(max).
E. @items xml.
F. @schema xml.
Answer: C,E
Q14. You have a database named Database1. Database1 has two stored procedures named Proc1 and Proc2 and a table named Table1. Table1 has millions of rows.
Proc1 updates data in Table1. Proc2 reads data from Table1.
You discover that when Proc1 is executed to update more than 4,000 rows, Proc2 is blocked. The block affects all rows, including those that are not being updated by Proc1.
You need to ensure that when Proc1 is executing, Proc2 can access the data in Table1 that Proc1 is not updating.
What should you change Proc1 to do?
More than one answer choice may achieve the goal. Select the BEST answer.
A. Update less than 4,000 rows simultaneously.
B. Use the PAGLOCK table hint.
C. Wait for Proc2 to complete.
D. Use the ROWLOCK table hint.
Answer: A
Q15. Which data type should you use for CustomerID?
A. varchar(11)
B. bigint
C. nvarchar(11)
D. char(11)
Answer: D
Explanation:
Invoices.xml All customer IDs are 11 digits. The first three digits of a customer ID represent the customer's country. The remaining eight digits are the customer's account number. int: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) (just 10 digits max) bigint: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807) http://msdn.microsoft.com/en-us/library/ms176089.aspx http://msdn.microsoft.com/en-us/library/ms187745.aspx
Q16. Topic 8)
You are designing a database for a university. The database will contain two tables named
Classes and StudentGrades that have the following specifications:
. Classes will store brochures in the XPS format. . The brochures must be structured in folders and must be accessible byusing UNC paths. . StudentGrades must be backed up on a separate schedule than the rest ofthe database.
You need to identify which SQL Server technology meets the specifications of each table. Which technologies should you identify? To answer, drag the appropriate technology to the correct table in the answer area.
Answer:
Q17. You need to recommend a solution to ensure that SQL1 supports the auditing requirements of usp_UpdateEmployeeName.
What should you include in the recommendation?
A. Change data capture
B. Change tracking
C. Transactional replication
D. The Distributed Transaction Coordinator (DTC)
Answer: D