Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying a TraceID

Status
Not open for further replies.

nancyd1111

Technical User
Sep 7, 2005
9
US
If I have executed a stored procedure to create a trace file, how is it that at a later point I identify the TraceID of this newly created file so that I can stop and close the trace?

If I try to delete a .trc file and it hasn't been closed, I get a sharing violation message, which is expected.

How is it that I stop/close the file so that I can perform the "delete".

Does SQL Profiler (if I have the file open) somehow allow me to see which ID is allocated to the .trc that is currently open?
 
You use sp_trace_setstatus to stop and close the trace.
You can use this to find out the settings of all the open traces
Code:
SELECT *
FROM ::fn_trace_getinfo(default)

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
Donate to Katrina relief
 
Denny,

Thank you once again for your assistance. It's all working.

Appreciate it!

nancyd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top