locked
how to capture the script that is running the trace at the back end RRS feed

  • Question

  • I have a trace running on DB server at the back end and capturing the data events in file with extention .trc

    i need to know what query is running that trace,

    Please advise


    k


    • Edited by '''HuuM''' Thursday, October 24, 2013 1:46 PM
    Thursday, October 24, 2013 1:41 PM

Answers

  • Hi,

    If you want to script the trace definition select the following option in the SQL profiler file menu.

    File-->Export--->Script Trace Definition-->


    Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer


    Thursday, October 24, 2013 1:54 PM
    Answerer

All replies

  • Hi,

    If you want to script the trace definition select the following option in the SQL profiler file menu.

    File-->Export--->Script Trace Definition-->


    Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer


    Thursday, October 24, 2013 1:54 PM
    Answerer
  • Hello can you please provide more on this

    your request is to know what queries running, then it is similar to like go to that path and open you can see what is currently capturing-

    On sql server 2000
     SELECT * FROM fn_trace_getinfo(default);

    on 2005+
    select * from sys.traces
     you can see what traces are running, then identify which one you want to open , then you can go to that path for view.
    ref-sys.traces (Transact-SQL)
    http://technet.microsoft.com/en-us/library/ms178579.aspx

    or your question under that trace running what are all the events being called?


    Thanks, Rama Udaya.K (http://rama38udaya.wordpress.com) ---------------------------------------- Please remember to mark the replies as answers if they help and UN-mark them if they provide no help,Vote if they gives you information.

    Thursday, October 24, 2013 2:20 PM
  • There is not a "query running that trace".  A trace is a configuration and then it runs until stopped.  You will not see a connection actively running a trace query.

    Thursday, October 24, 2013 2:32 PM
    Answerer