Re: sp_trace_setfilter does not work



Because when I open the trace file, I see all activity. I want to only see the activity from my application's login which is why I'm using the login filter. Also when I look at the trace file's properties using the profiler gui, there's nothing in the filter section.

"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message news:Xns98D9F339A40Yazorman@xxxxxxxxxxxx
Quinn (dellsql@xxxxxxxxxxxxxxxxx) writes:
I am trying to create a server side trace via script. The trace will
have a filter on LoginName. However the trace is created but the filter
is not there. I used to do this all the time under SQL 2000 but I have
not been able to set the filters using sp_trace_setfilter under SQL
2005. I'm using SQL 2005 with SP1. Below is the script. I just generated
it from Profiler.

I'm not sure how you deduce that the filter is not there. I tried your
script, changed to a login on myserver. I logged as that user, ran
some queries, and ran some queries from Windows login. I then stopped
the trace and used fn_trace_gettable to look at the result, and it seemed
OK to me.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

.



Relevant Pages

  • Re: SQL Profiler Scheduling
    ... What I do is simply to add a filter on StartTime to the trace, ... It's possible to set a stop time when you set up a trace. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • RE: Filter in Replication
    ... login and password to the SQL Server database. ... > device used by an individual user or multiple users? ... > can't rely on this in the filter. ...
    (microsoft.public.sqlserver.replication)
  • Re: sp_trace_setfilter does not work
    ... However the trace is created but the filter ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: application slow
    ... experience unusual slowness, including timeouts. ... Could the cause be external to SQL Server? ... You might try the same trace without a filter during the problem period ...
    (microsoft.public.sqlserver.server)
  • RE: Filter in Replication
    ... I must clarify that the ability to filter data ... on a per subscriber basis is part of merge replication ... Your login mask may or may not be an issue. ... username and password used to log into sql server - ie is ...
    (microsoft.public.sqlserver.replication)