Configuring the system view

The system_view is a session-specific setting that allows you to control the scope of monitoring data that queries return from the monitoring tables, sysprocesses, sp_who, and other commands. When you set system_view to cluster, queries on the monitoring tables return data from all active instances in the cluster. When you set system_view to instance, queries on the monitoring tables return data only for processes or objects that are active on the instance to which the client is connected.

Use the set command to configure the scope of the session:

set system_view {instance | cluster | clear}

where:

This example modifies the session settings so queries on the monitoring tables return data only for the instance to which the client is connected:

set system_view instance

This example modifies the session settings so queries on the monitoring tables return data for the cluster:

set system_view cluster

This example clears the current setting of the system view and returns system view to the default setting.

set system_view clear

If you do not specify an InstanceID when you query a monitoring table or call a monitoring table RPC, the instance uses the current system_view configuration.

The session system view is inherited from its host logical cluster. selecting the @@system_view global variable to determine the current system view.