Trace flag to capture error messages like PK violation

  • Is there a dbcc flag that will capture all error messages in the log

    e.g. when inserting data into a table, a PK violation occurs throwing, Msg 2627

    ..similar to trace flag 1222 to capture deadlock info..

  • waeva (4/24/2015)


    Is there a dbcc flag that will capture all error messages in the log

    e.g. when inserting data into a table, a PK violation occurs throwing, Msg 2627

    ..similar to trace flag 1222 to capture deadlock info..

    Quick thought, not that I remember but you can check you lucky numbers here.

    😎

  • create either a server side trace or an extended event that captures errors. then you can review them at your leisure.

    you can limit it to certain tspecific error values if needed, but it sounds like you want a catch all errors kind of thing;

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • @Eirikur, yes I checked there but was wondering if any 'undocumented' flags.. guess not.

    @lowell, yes I resorted to that

Viewing 4 posts - 1 through 3 (of 3 total)

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