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.
To enable it on the instance upon startup:
- Open SQL Configuration Manager
- Services > Sql Service Instance > Properties > Startup Parameters
- Add the following statement:
-T1222
- 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.