Re: SQL 2005 & server side trace



Joe

This is a known limitation of traces. To get multiple filters defined with the correct and/or combinations is very difficult and in some cases impossible to get what you want. You might consider capturing everything from dbid 29 and loading it into a table, and then use can use SQL statements to get the rows you want. Or, if that makes your trace too big, consider capturing two traces, one with dbid 29 and joesmith and the other dbid 29 and sa. You can then combine these two.

--
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

"GrampaJoe" <joeydba@xxxxxxxxx> wrote in message news:be54cfb6-c2da-499d-835d-549884905969@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I am trying to set up a server side trace where it will collect logins
and objects access by a list of users in one database. The problem I
am running into is using more then 2 sp_trace_setfilter to capture
more then 1 user name. Either I get nothing or get everyone and that
is not what I want.

Here is a snippet of the code I'm running via a query window.

exec sp_trace_setfilter @traceid, 3, 1, 0, 29 -- dbid for
MyDatabase
exec sp_trace_setfilter @traceid, 11, 1, 6, N'%joesmith%' -- any
version of a user with joesmith
exec sp_trace_setfilter @traceid, 11, 1, 6, N'%sa%' -- any login with
'sa' in it's name.

My problem is that I can capture either the "dbid 29 and %joesmith%"
or "dbid 29 and %sa%".
But I can not capture "dbid 29" and/or "%joesmith%" and/or "%sq%".
Meaning that I can not get the filters set correctly to only capture
any value of the 3 filters. I have played with the logical_operator
of "AND (0) or OR (1)" in many different ways, none of which worked.

This is on a SQL 2005 SP3 server.

Any help sure would be nice.

Thanks,
Joe

.



Relevant Pages

  • Re: Is my DSO glitchy, or its me? (Delayed single-sweep)
    ... > I would find it odd that it can only capture the traces alternately? ... > Doesn't the chop function work in storage mode? ...
    (sci.electronics.equipment)
  • Re: OutputDebugString() in TSP on Vista
    ... I could capture my traces by OutputDebugString. ... I am sorry that I am not at office and there is no Vista for me to verify ... I use OutputDebugString() in my TSP to output the trace of it. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: 2.6.19 file content corruption on ext3
    ... Ok, I've got the traces, but quite frankly, I doubt anybody is crazy ... It wants a _big_ kernel buffer to capture all the crud into (which is why ... I made the thing accept a bigger log buffer), and quite frankly, I'm not ... update_mmu_cache(vma, address, entry); ...
    (Linux-Kernel)
  • RE: Query taking long time to execute
    ... Please use SQL Profiler ... to capture a trace for both executions. ... the web that can help you understand the output from the Profiler traces. ... Thank you for using Microsoft newsgroups. ...
    (microsoft.public.sqlserver.programming)