July 6, 2010 at 8:11 am
Hello all,
I need to retrieve the TSQL from default trace file for the category_id=13 in
sys.trace_categories .
is it possible retrieve what are the sql queries run in sql server 2005 using default trace file?
July 6, 2010 at 9:03 am
AFAIK, the default trace cannot be altered.
Have you looked it up in BOL?
-- Gianluca Sartori
July 6, 2010 at 10:33 am
The default trace cannot be modified. Create your own trace script (export from Profiler if you like) and run that for the periods that you want.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 6, 2010 at 10:43 am
Here's a script that will create a procedure to help you script out any existing trace on the server; with that, you can tweak the script to make a NEW trace that might last longer or have other additional events:
Reverse Engineer A Server Side Trace
to catch the queries, you need a DML trace; I've got a suggested example here:
Some Audit,DDL and DML SQL Trace Examples
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply