Is it possible to change the default trace settings

  • 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?

  • AFAIK, the default trace cannot be altered.

    Have you looked it up in BOL?

    -- Gianluca Sartori

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply