sp_trace_setstatus (Transact-SQL)
Modifies the current state of the specified trace.
Important
|
|---|
|
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use Extended Events instead. |
The following table describes the code values that users may get following completion of the stored procedure.
|
Return code |
Description |
|---|---|
|
0 |
No error. |
|
1 |
Unknown error. |
|
8 |
The specified Status is not valid. |
|
9 |
The specified Trace Handle is not valid. |
|
13 |
Out of memory. Returned when there is not enough memory to perform the specified action. |
If the trace is already in the state specified, SQL Server will return 0.
Parameters of all SQL Trace stored procedures (sp_trace_xx) are strictly typed. If these parameters are not called with the correct input parameter data types, as specified in the argument description, the stored procedure will return an error.
For an example of using trace stored procedures, see Create a Trace (Transact-SQL).
Important