Checks the trace status and then turns the trace on. The -1 means that the trace was set globally. This was done to track deadlocks.
DBCC TRACESTATUS (1204, 1222); DBCC TRACEON (1204, 1222) DBCC TRACEON (1222, -1)