December 2001
Intermediate to advanced
800 pages
17h 55m
English
Starting a trace using a stored procedure is nifty enough, but how do we stop it so that we can analyze the trace file? We use sp_stop_trace. Here's its code (Listing 21-5):
USE master GO IF OBJECT_ID('sp_stop_trace') IS NOT NULL DROP PROC sp_stop_trace GO CREATE PROC sp_stop_trace @TraceName sysname='tsqltrace' /* Object: sp_stop_trace Description: Stops a Profiler-like trace using Transact-SQL eXtended Procedure calls. Usage: sp_stop_trace @TraceName sysname default: tsqltrace -- Specifies the name of the trace Returns: (None) $Author: Ken Henderson $. Email: khen@khen.com $Revision: 2.0 $ Example: EXEC sp_stop_trace -- Stops the default trace Created: 1999-04-01. $Modtime: 2000-12-16 $ */ AS SET ... |
Read now
Unlock full access