Re: Creating a trace from a script
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Thu, 5 Mar 2009 07:00:07 +0000 (UTC)
Bill E. (billmiami2@xxxxxxxxxxxx) writes:
I do this all the time on SQL 2005 but for some reason it's not
working properly on SQL 2000.
I'm trying to create a trace from a script (sp_trace_create,
sp_trace_setevent, sp_trace_setfilter, sp_trace_setstatus). I'm
saving the output to a .trc file. When I run my script, the trace
file is created on the server, but its size is 0 bytes and it does not
grow as expected. When I try to read from it with a SELECT on
fn_trace_gettable, I get an error saying that my trace file is
unreadable.
I am able to create a working trace using Profiler but when I script
the trace and then run the script, the same thing happens.
What could be the problem? Is it a permissions issue?
Did you stop the trace before you tried to access it?
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Creating a trace from a script
- From: Bill E.
- Re: Creating a trace from a script
- References:
- Creating a trace from a script
- From: Bill E.
- Creating a trace from a script
- Prev by Date: Re: Stored Procedure Enhancing Performance
- Next by Date: Re: Creating a trace from a script
- Previous by thread: Re: Creating a trace from a script
- Next by thread: Re: Creating a trace from a script
- Index(es):
Relevant Pages
|