xp_trace_setqueuecreateinfo (T-SQL)

Specifies the trace queue properties to modify.

Syntax

xp_trace_setqueuecreateinfo {queue_handle, max_items, timeout,
    
thread_boost, thread_reduce, event_class}

Arguments
queue_handle
Is an integer representing the handle for the trace queue. queue_handle is used to reference the trace queue and is placed in an output parameter by xp_trace_addnewqueue.
max_items
Is an integer representing the maximum number of items to be buffered or stored in the trace queue. The recommended value is 1000, the minimum is 1, and the maximum is 20000.
timeout
Is an integer representing the time-out value in seconds for the trace queue. The default value is 5, the minimum is 1, and the maximum is 10.
thread_boost
Is an integer representing the percentage of items in the trace queue that will cause the trace queue consumer to receive a boost in priority and increases the priority setting for the specified application thread. The default percentage is 95, the minimum is 1, and the maximum is 100. thread_reduce cannot be greater than thread_boost.
thread_reduce
Is an integer representing the percentage of items in the trace queue that will cause the trace queue consumer to receive a reduction in priority and decreases the priority setting for the specified application thread. The default percentage is 90, the minimum is 0, and the maximum is 99. thread_reduce cannot be greater than thread_boost.
event_class
Is an integer representing the class of events to trace. If event_class is not specified, all event classes are returned, indicating whether they are being traced for the given queue_handle. 0 specifies all event classes. Execute xp_trace_geteventnames to see this list.
Return Code Values

0 (success) or >1 (failure)

Result Sets

xp_trace_setqueuecreateinfo returns this message:

The command(s) completed successfully.

  

Permissions

Execute permissions for xp_trace_setqueuecreateinfo default to members of the sysadmin fixed server role but can be granted to other users.

Examples

This example modifies a previously created trace queue to include all columns in the output.

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_setqueuecreateinfo @queue_handle,

    12500,

    10,

    35,

    10,

    0

  

See Also
Monitoring with SQL Server Profiler xp_trace_getqueueproperties
xp_trace_addnewqueue System Stored Procedures (SQL Server Profiler Extended Procedures)

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.