xp_trace_getqueueautostart (T-SQL)

Retrieves the specified trace definition startup configuration information, which is configured by executing xp_setqueueautostart and associated with the specified trace queue definition. The trace queue startup configuration information indicates the given trace queue for automatic start.

Syntax

xp_trace_getqueueautostart {'queue_name'}

Arguments
'queue_name'
Is a string value that represents the trace queue name. This name can be determined by executing xp_trace_enumqueuedefname.
Return Code Values

0 (success) or >1 (failure)

Result Sets
Column name Description
QueueName The trace queue name
AutoStart Whether the trace queue is autostart enabled (1) or not (0)

Permissions

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

Examples

This example retrieves the trace queue autostart status for the trace queue. Because xp_trace_getqueueautostart retrieves a previously defined trace queue, xp_trace_setqueuedefinition is executed before xp_trace_getqueueautostart.

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,

    'London Attention',

    1

EXEC xp_trace_getqueueautostart 'London Attention'

  

See Also
Monitoring with SQL Server Profiler xp_trace_loadqueuedefinition
xp_trace_addnewqueue xp_trace_pausequeue
xp_trace_deletequeuedefinition xp_trace_restartqueue
xp_trace_destroyqueue xp_trace_savequeuedefinition
xp_trace_enumqueuedefname System Stored Procedures (SQL Server Profiler Extended Procedures)
xp_trace_enumqueuehandles  

  


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