Contents

Setting DBCC 1222 on startup

Contents

The following command is run to gain details on deadlocks.

DBCC TRACEON (1222,-1)

However, once the SQL instance is restarted this flag is set back to disabled.

https://d33wubrfki0l68.cloudfront.net/22617fc6c0198339a6db184750e49a57c66af40e/9bb78/images/2016-08-30_09-57-20.png To enable it on the instance upon startup:

  1. Open SQL Configuration Manager
  2. Services > Sql Service Instance > Properties > Startup Parameters
  3. Add the following statement: -T1222
  4. Confirm the change by navigating to Advanced > Startup Parameters. This should be grayed out and display the new value that was added at the end with a delimited semicolon.

https://d33wubrfki0l68.cloudfront.net/8bfb8e722e5c8f0f3d7d7640d634dc4f6b75b5c9/40fbf/images/2016-08-30_09-58-08.png