Automating SQL Traces

  • Comments posted to this topic are about the item Automating SQL Traces

  • Thanks for a well presented, well thought out article, which has expanded my knowledge.


    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Nice article.

    Since profiler traces are deprecated, did you attempt to do this with an extended event?

    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes

    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Thanks for taking the time to share this.

    I am having problems setting up the alert. I get this error:

    The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has has the correct syntax. (Microsoft SQL Server, Error:22022)

    I made sure the WMI namespace was \\.\root\cimv2 and used the query you provided.

    The SQL Server Agent service account is a domain account. We are running SQL Server 2008 Standard, SP2 (10.0.4000)

    Found nothing in the SQL log or Windows events logs.

    Any ideas on what I did wrong? Thanks.


  • Thanks, this is a great article that's opened an area I've never really explored before. However, it's not really working the way I'd expected. I have a lightly used, dedicated server (nothing runs on it except SQL Server). The Windows CPU graph hardly ticks up (see below):-

    Yet I'm getting alerts every 20 to 30 minutes. The spike on the left caused one of those alerts.

    I don't understand it.

    I thought the "WITHIN 120" required the 95% usage to be sustained for 2 minutes, yet the performance graph shows only a brief spike.

  • submitted before finished .. . see response in next post below

  • Lee,

    Sorry I didn't see your question earlier; I didn't realize the article had been published yet.

    Concerning the WMI error you reference, three immediate possibilities come to mind:

    1.) Is SQL Server Service Broker enabled?


    2.) Is this a cluster configuration relevant to MS Support Post:


    3.) Does the domain account have rights to query WMI on this server?




  • Clark,

    Thanks for the response. I checked and broker was enabled, the domain account was able to query WMI and the instance is not a cluster. What I ended up doing was taking the query that I had cut and pasted from your excellent article and comlpetely re-enter it manually. Then it worked fine. Very strange. Thanks again for you article and yor response.


  • Viewing 8 posts - 1 through 7 (of 7 total)

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