Monitoring Your Database with SQL Profiler

  • Is there any way to identify if someone is running "Monitoring Your Database with SQL Profiler" sql trace against production database. ?

    We are having issue with our current application performance, after diagnosing the problem, we realized one of our database admin decided to use this tools during peak hours that effect application performance. Is there any way we can setup some notification in case, if any other admin decided to follow hand on training for sql trace ?

  • You could download and run sp_whoisactive. Whenever SQL Server Profiler is running, the program_name column in the output of sp_whoisactive will have something along the lines of 'SQL Server Profiler - 8d20b44e-81ef'. You could schedule a run of sp_whoisactive, output the results to a table or temp table, and flag an alert on program_name LIKE 'SQL Server Profiler%'.

    http:\\www.tinyurl.com/whoisactive

    Twitter: @SQL_JGood
    Blog: sqljgood.wordpress.com/[/url]

  • also I'm pretty sure a profiler created trace does not have a path: so you can do check sys.traces as a quick sanity check, and that would tell you if one is currently being run or not.

    select *

    from sys.traces

    where path is null --Profiler.exe created this trace!

    and status = 1 --is it running right now?

    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!

  • * also the Database Engine Tuning Advisor creates a trace with a NULL path, as well.

    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!

  • Perfecto, Thank you so much. Apperciate your help

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

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