Sql profiler error tracking

  • i have created a trace in sql profiler for finding out errors alone. like foreign key conflict, sntax errors, user errors like that. I have passed the error information to table and not to trc file. will it affect performance. since i have included only Error Log under Error& warning events i think it wont affect performance. any suggestions pls and also for trace table i have created a trigger which sends mail to admin.

    thanks in advance

  • If its high OLTP then you definitely will have slight performance issue.

    It also depends how many errors are generated per min, if this is high then there will be i/o activity to put this in table.

    I would suggest leave it for 1 hour check how many records are trapped and then take a call.

  • It really depends on how you define "affect performance." The fact of the matter is, you're using server resources for tracking errors, possibly at the time when server resources are most needed. While I realize you can set up traces to output directly to tables, I'm pretty much against the practice because writing to files is almost always going to be more efficient and put less of a strain on the server.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • Thanks for your reply. Helped me a lot. would be implementing server -side trace and appending it to file.

  • hi everyone,

    After creating server side trace and logging the errors to file, and using

    SELECT *

    FROM ::fn_trace_gettable('C:\ErrorTrace.trc', DEFAULT)

    but the problem is Textdata column shows like "Invalid object name '%.*ls'.", "Incorrect syntax near '%.*ls'.". but what i need is the table name where the error occured.

    i need something like this "invalid object name students" where students is table name

    any solution. Thanks in advance

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

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