sql2005 trace doubts

I found a following filter in one of teh server side trace in our environment...

Can someone explain me what actually the trace does with below filter ?


EXEC sp_trace_setfilter @TraceID, 1, 0, 6, N'%INSERT%'
EXEC sp_trace_setfilter @TraceID, 1, 1, 6, N'%UPDATE%'
EXEC sp_trace_setfilter @TraceID, 1, 1, 6, N'%DELETE%'
EXEC sp_trace_setfilter @TraceID, 1, 1, 6, N'%DROP%'

EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT #%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT INTO #%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT [#%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT INTO [#%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT @%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'INSERT INTO @%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'UPDATE #%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'UPDATE [#%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'DELETE #%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'DELETE [#%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'DROP TABLE #%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'DROP TABLE [#%'
EXEC sp_trace_setfilter @TraceID, 1, 0, 7, N'SELECT%'
motioneyeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
here is the syntax
sp_trace_setfilter [ @traceid = ] trace_id  
          , [ @columnid = ] column_id
          , [ @logical_operator = ] logical_operator
          , [ @comparison_operator = ] comparison_operator
          , [ @value = ] value

6 and 7 are comparison operators  6  stands for LIKE and 7 NOT like

http://technet.microsoft.com/en-us/library/ms174404(v=sql.105).aspx

EXEC sp_trace_setfilter @TraceID, 1, 0, 6, N'%INSERT% means  this trace filters all the insert on column 1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
motioneyeAuthor Commented:
Hi,
I'm tryig to add below filter but when I try with modify / removed user db role, it does not capture in my trace.


EXEC sp_trace_setfilter @trId, 1, 1, 6, N'sp_addrolemember%'
EXEC sp_trace_setfilter @trId, 1, 1, 6, N'sp_droprolemember%'
0
motioneyeAuthor Commented:
Hi,
Any thoughts with my last reply ?
0
motioneyeAuthor Commented:
My questions is only partially answered, anyway thanks for the link suggestions.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.