YOU’VE BEEN INVESTIGATING DEADLOCKS ON YOUR SERVER USING TRACE FLA...

14. You’ve been investigating deadlocks on your server using trace flag 1222, and

you’d like to enable it permanently to capture extra information if deadlocks

occur again, even if SQL Server gets restarted. What is the easiest way to

do this?

A. Execute DBCC TRACEON (1222,-1)

B. Create a start-up stored procedure containing DBCC TRACEON

(1222,-1) and use sp_configure to enable scan for startup procs

C. Use Configuration Manager to add –T1222 as a start-up parameter for the

SQL Server service

D. Execute DBCC TRACEON (1222)

Correct Answer & Explanation: C. –T is a start-up switch that enables the

specific trace flag for all connections.

Incorrect Answers & Explanations: A, B, D. Answer A is incorrect; although

this would enable the trace flag on all connections (-1), it will not persist a ser-

vice restart. Answer B is incorrect because it is not the easiest method for

achieving the goal. Answer D is incorrect because the trace flag will not persist

a service restart and would only enable it on the current connection.