SQL trace configuration - help

  • Hi everyone.

    Bit stuck and hope someone can help me out.

    Setting up a trace , got it working on the events I want etc. Now I want to filter out certain databases and only include the ones I specify.

    I have put this together , but not sure I have it correct.

    Using this to exclude database name containing 1234

    exec sp_trace_setfilter @traceid, 35, 0, 7, N'%1234%'

    and using this to include any database name containing ABC

    exec sp_trace_setfilter @traceid, 35, 0, 6, N'%ABC%'

    But do I need to set an exclusion if I am trying to specify certain databases that I only want to capture information on ?

    Is that correct ? Any advice improvements appreciated.

    Been using this for guidance.

    https://msdn.microsoft.com/en-GB/library/ms174404.aspx

  • once you specify an include to limit the profiler to just the databases you want, you don't have to specify an exclude as well.

    ---------------------------------------------------------------------

Viewing 2 posts - 1 through 1 (of 1 total)

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