How DO I Work with DBCC TRACEOn(1204) FLAG

  • I have two stored procedures that are causing deadlock.

    I need to see the report of the same.

    How Can i do it?

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • In QA do:

    dbcc traceon(-1)

    dbcc traceon (1204)

    dbcc traceon (3605)

    This should write deadlock info to the errorlog.

    Cheers,

    - Mark


    Cheers,
    - Mark

  • You also have to switch on trace flag 3605, in order to get the deadlock information sent to the SQL Server error log.

    I generally use the following statement;

    DBCC TRACEON (1204, 1205, 3605, -1)

  • Never realised you could put them all in one statement.

    I learn something new every day.

    Cheers,

    - Mark


    Cheers,
    - Mark

  • Thanx mccork and Simon Clarke for the information.

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • Thanx mccork,Simon for the information.

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply