GV$ Views on Oracle RAC

When administrating a RAC system use the dictionary views of GV$ and not V$.
GV$ has additional columns inst_id .

For almost every V$ view described in this chapter, Oracle has a corresponding GV$ (global V$) view. In Real Application Clusters, querying a GV$ view retrieves the V$ view information from all qualified instances.

In addition to the V$ information, each GV$ view contains an extra column named INST_ID of datatype NUMBER. The INST_ID column displays the instance number from which the associatedV$ view information was obtained. The INST_ID column can be used as a filter to retrieve V$information from a subset of available instances

GV$ V$
Across all the nodes:
The beauty of system dictionary views of GV$ which reflect information across the various nodes of a RAC system
Only the current node
The V$ views of the data dictionary, which relate to the current status of the single node you are connected to

For example;

select distinct(username) from v$session;

It only reflects connections to the connected node and not the entire RAC.

select distinct(username) from gv$session;

It gives the view of all sessions within the RAC.
The GV$ dictionary views have the additional INST_ID column which give the node that the action is occurring in


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s