SQL profiler

  • Can someone send me T-SQL examples to trace Long Running quries, queries generating Deadlocks and Stored Procedue tracking Using Profiler? Please also let me know which events,data columns and filters need to trace for all this.

     

     

     


    Vss

  • Long Running Queries

    Use the SQLProfilerTSQL_Duration template and set a Filter on Duration for greater than equal to 1000 (time in milliseconds).

    Deadlocks

    Tracing deadlocks via profiler will only show you that they are occuring and not provide you with any information you will need to use trace flags to find out the information relating to Deadlocks.

    Stored Procedure Tracking

    Set a filter on TextData like 'exec GetCustomer%', use % and _ wildcards in the same manner as you would in TSQL.

  • Deadlocks

    It would be helpful to me if you can send me snapshot of deadlock occurences (using Profiler)  my emailid is vssohal@hotmail.com

    Thanks


    Vss

  • Sorry, but unless I generate them, I may have to wait for weeks for get any deadlocks in a profiler trace, we very very rarely have any.

  • These may be of use to you:

    INF: How to Monitor SQL Server 2000 Blocking

    http://support.microsoft.com/default.aspx?scid=kb;en-us;271509

    INF: Understanding and Resolving SQL Server 7.0 or 2000 Blocking Problems

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;224453

    K. Brian Kelley
    @kbriankelley

  • Thanks link to http://www.truthsolutions.com was really useful.


    Vss

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

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