{{theTime}}

Search This Blog

Total Pageviews

Enable Trace Flag 1024, 1222 to detect deadlocks in msssql server

How to enable trace flag 1024, 1222 to log the deadlock sql's to the error log.

DBCC TRACEON (1024,1222)

Turn off dead lock trace flag
DBCC TRACEOFF (1024,1222)

No comments:

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...