xp_trace_setsysobjectsfilter (T-SQL)

Specifies the system objects filter, or if system objects are to be captured or not, for the events specified.

Syntax

xp_trace_setsysobjectsfilter {queue_handle, sysobjects_value}

Arguments
queue_handle
Is an integer that represents 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.
sysobjects_value
Is an integer that indicates whether system objects should be captured (0) or not (1).
Return Code Values

0 (success) or >1 (failure)

Result Sets

xp_trace_setsysobjectsfilter returns this message:

The command(s) completed successfully.

  

Permissions

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

Examples

This example enables the capturing of system objects by setting sysobjects_value to 1.

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_setsysobjectsfilter @queue_handle, 1

  

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

  


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