Microsoft
70-451 · Question #22
70-451 Question #22: Real Exam Question with Answer & Explanation
Sign in or unlock 70-451 to reveal the answer and full explanation for question #22. The question stem and answer options stay visible for context.
Question
You are a database developer. You plan to design a database solution by using SQL Server 2008. You create a stored procedure that uses the TRY/CATCH syntax in a new database. When the stored procedure is executed, it logs information about each step in the TRY block into a table named dbo.ExecutionLog. When an error occurs, the stored procedure must perform the following tasks: - Roll back the changes made to the target tables. - Retain the log entries stored in the dbo.ExecutionLog table. You need to ensure that the stored procedure performs the given tasks. What should you do?
Options
- A1.Start a transaction in the TRY block.
- B
- Start a transaction in the TRY block.
- C
- Define a temporary table before the TRY block by using the same columns as that of the
- D
- Define a table variable before the TRY block by using the same columns as that of the
Unlock 70-451 to see the answer
You've previewed enough free 70-451 questions. Unlock 70-451 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.