Server Side Trace - Exclude rows that do not contain values

Last post 09-02-2008 11:32 AM by MichaelB. 2 replies.
Page 1 of 1 (3 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 08-22-2008 7:36 AM

    Server Side Trace - Exclude rows that do not contain values

    I am trying to run a server side trace based on duration that will exclude rows that are null for that field.

    If I add this as a filter it does not work. 

     declare @bigintfilter bigint
    set @bigintfilter = null
    exec sp_trace_setfilter @TraceID, 13, 0, 1, @bigintfilter

    I also tried 

    set @bigintfilter = 0
    exec sp_trace_setfilter @TraceID, 13, 0, 1, @bigintfilter 

    I get lots of nulls.  Yes, I have the @traceid prior:)

    Any thoughts? or can this not be done

    Michael
    Sr. DBA - MCDBA
    See my Reader 2 Reader articles in Jan and August 2008 issues of SQL Server Magazine:)
    View Michael Berry's profile on LinkedIn
  • 08-31-2008 12:55 PM In reply to

    • satya
    • Top 10 Contributor
    • Joined on 11-05-2002
    • United Kingdom
    • Posts 22,515
    • Microsoft MVP
      Moderator

    Re: Server Side Trace - Exclude rows that do not contain values

    Try using:

    set @bigintfilter = 0
    exec sp_trace_setfilter @TraceID, 13, 0, 1, NULL
    
    -Satya S K J

    SQL Server MVP



    Knowledge is Power, you will gain by sharing it. SSQA.net - Invisible contributions to the users & visible success in SQL Community.
  • 09-02-2008 11:32 AM In reply to

    Re: Server Side Trace - Exclude rows that do not contain values

     Sorry.  That didnt work:( 

    This should be easy!:(

    Michael
    Sr. DBA - MCDBA
    See my Reader 2 Reader articles in Jan and August 2008 issues of SQL Server Magazine:)
    View Michael Berry's profile on LinkedIn
Page 1 of 1 (3 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.