Profiler Trace running

  • Hello,

    I've noticed that over my holidays some start cookie has created a .trc file which has been running for a couple of days now and i would like to know how can i find out from what pc it was created on so i can stop it.

    Cheers 🙂

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • Do you mean your server has a trace file running?

    This doesn't mean profiler is running. You can kill the trace.

    Or examine connections to your instance.

  • Yeah, a profiler trace is running on the server and i wanna from which machine its running from.

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • May be dafault trace running :

    to stop :

    sp_configure 'default trace enabled',0

    go

    reconfigure

    go

    Find running trace :

    select * from fn_trace_getinfo(0)

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • Thanks Paresh,

    You where bang on , default profile trace had been switched on.

    Cheers 🙂

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • Mr J (11/23/2008)


    Yeah, a profiler trace is running on the server and i wanna from which machine its running from.

    In SQL Server Management Studio, open the Management folder, and select activity monitor. One of these should be the profiler (you'll see the words profiler and/or Trace). Look at the hostname column and that should narrow it down.

    Gaby
    ________________________________________________________________
    "In theory, theory and practice are the same. In practice, they are not."
    - Albert Einstein

  • Default trace is never switched on, it is on by default.

    You might want to consider carefully whether you want to go ahead and switch it off for no particular reason: it costs very little in overhead to run and it captures a good deal of information that can help you troubleshoot your instance of SQL Server.

    Just a thought.

  • Also the default trace is used as the source for many of the reports available in SSMS. So if you disable it you will lose those reports as well.

    There is no real reason to stop it. I have answered many questions for SQL Server 7, 2000 that would have had an an easy answer if those versions had the default trace running.

  • Ease way to find trace is following :

    select * from fn_trace_getinfo(0) where value = 5 --

    if default trace is running then value is 1 , then we can capture other trace id

    We can stop it from following command:

    exec sp_trace_setstatus 'traceid -- which got from upper query' ,0

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • Just to note in SQL Server 2005 and later you get better information by querying sys.traces instead of fn_tracegetinfo and is actually the recommended method.

  • Cheers everyone for the wealth of knowlegde 🙂

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • to make the trace easier to read\sort dump the output to a sql table

    SELECT * INTO tablename

    FROM ::fn_trace_gettable('d:\path to trace\tracename.trc', default)

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 12 posts - 1 through 11 (of 11 total)

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