Specifies the trace queue definition to save.
xp_trace_savequeuedefinition {queue_handle, 'queue_name', is_shared}
0 (success) or >1 (failure)
xp_trace_savequeuedefinition returns this message:
The command(s) completed successfully.
If you choose to save a queue definition as a private definition, it is only available to you. If you choose to save a queue definition as a shared definition, it is available to anyone who logs on to that particular computer.
Execute permissions for xp_trace_savequeuedefinition default to members of the sysadmin fixed server role but can be granted to other users.
This example saves the trace queue definition for the Seattle SQL Batch Starting and Completing trace queue as a private trace queue definition.
USE master
DECLARE @queue_handle int, @column_value int
SET @column_value = 16|32|8192|128|512
EXEC xp_trace_addnewqueue 1000,
5,
95,
90,
@column_value,
@queue_handle OUTPUT
EXEC xp_trace_savequeuedefinition @queue_handle,
'Seattle SQL Batch Starting and Completing',
0