Results 1 to 8 of 8

Thread: Trace Info

  1. #1
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135

    Angry Unanswered: Trace Info

    Folks, I've inherited a SQL 2K server that has a trace running. I can see the trace file being generated(.trc), I can also see the standard templates(.tdf). But BOL is not helpful in finding information about the
    trace when you have no information. I just want to shut the damn thing off.

    I can open the trc file in SQL Profiler but I am not proficient in the tool's use. I also don't see a trace table anywere in the database.

    If anyone can be of any help it would be much appreciated. Thanks.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245

    Re: Trace Info

    First off, my empathies.

    I dug around some in SQL Books on Line, but I did not find a whole lot. Look at sp_trace_create. Most of what SQL BOL covers is about the GUI to Profiler, but sp_trace_create is what I am guessing that you are dealing with.

    I THOUGHT that you could stop the trace simply by cycling the server. However, I think there is also a property to SQL Agent that allows you to specify a command to execute when SQL Agent start. Unfortunately, I can't remember where the SQL Agent startup option is stored. Still checking...

    Regards,

    hmscott

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Look at sp_trace_setstatus

    It allows you to stop the trace...

    Also on the BOL page, there are functions listed to tell you whats going on....

    fn_trace_getinfo

    Now, I've NEVER done it this way....good luck....

    And I would think it's running on the box itself, which from EVERYTHING I've read is a BIG no no....

    Look! It's a pig in a dress!
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135
    Thanks guys...I've looked at the stored procs for this but it would appear I would have to supply the traceid which is unknown. My reading continues as I am digging through ny copy of "Inside SQL Server" to see if it can shed some more light. If I solve this one I will be sure to let ya know.

    One thing I've learned is that there is server side tracing whcih does not use SQL Profiler, that is used by the client-side component.

    Thanks again for the suggestions.

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Did you try this?

    SELECT *
    FROM ::fn_trace_getinfo(0)
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135

    Thumbs up

    That would be what I was looking for. Thanks for your help.

    (I think I need to learn more about functions!)

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It was on the sp_trace_setstatus page in BOL....I just got lucky....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135
    Originally posted by Brett Kaiser
    It was on the sp_trace_setstatus page in BOL....I just got lucky....
    LUCK IS NEVER A BAD THING! I used setstatus and will return to address this mess tomorrow. Thanks again for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •