Which action should you take?

You have a database that resides on an instance of SQL Server 2008. You are creating a stored procedure that will update a critical table. The stored procedure reads data in the Master table, performs aggregation calculations on the table’s data, and populates a table variable with the result.
You must ensure that the variable always contains the most up-to-date information from the Master table, and you want to lock the table exclusively while the query runs.
Which action should you take?
A. Set the ALLOW_SNAPSHOT_ISOLATION database option to ON.
B. Perform the aggregate calculations within a transaction, and set the transaction’s isolation level to REPEATABLE READ.
C. Include the READPAST query hint in the query containing the aggregate calculations.
D. Add the TABLOCKX hint to the query containing the aggregate calculations.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.