Using SYS_CONTEXT Parameters in a GDS Environment

To identify GDS global-service sessions as a unified pool, query SYS_CONTEXT('USERENV', ...) for GDS-specific values.

For a session established using a connection to a global service, some parameters of namespace USERENV have values that are different from values set when connecting to a local service on the same database. The different values for a global service are set to make the database pool appear to clients as a single database with many instances.

When a client connects to a global service, GDS sets the following in the session context differently.

  • DB_UNIQUE_NAME and DB_DOMAIN are set to **.** .
  • INSTANCE is set to a system-generated number ** that is unique within a GDS configuration.
  • INSTANCE_NAME is set to ** % ** .
  • SERVICE_NAME is set to ** % .

Parent topic: Troubleshooting GDS Issues