December 2001
Intermediate to advanced
800 pages
17h 55m
English
Because the trace routines are designed to allow you to start the trace and leave it running even if you close the connection, it's possible that you'll need a means of checking the status of the currently running traces. This is what sp_list_trace is for. Here's its code (Listing 21-6):
USE master GO IF OBJECT_ID('sp_list_trace') IS NOT NULL DROP PROC sp_list_trace GO CREATE PROC sp_list_trace @TraceId varchar(10)=NULL /* Object: sp_list_trace Description: Lists the currently running traces. Usage: sp_list_trace @TraceId -- the ID number of a previously started trace (optional) Returns: (None) $Author: Ken Henderson $. Email: khen@khen.com $Revision: 2.0 $ Example: EXEC sp_list_trace -- Lists the currently ... |
Read now
Unlock full access