|Oracle® Database Global Data Services Concepts and Administration Guide
12c Release 1 (12.1)
|PDF · Mobi · ePub|
The Global Data Services framework consists of at least one global service manager, a Global Data Services catalog, and the GDS configuration databases. Some components of the framework are installed when you install Oracle Database 12c. Other components require that you perform certain tasks using the Global Data Services control utility (GDSCTL).
See Also:Appendix A, "Global Data Services Control Utility (GDSCTL) Reference" to familiarize yourself with GDSCTL
This chapter includes the following topics:
The global service manager is the central component of the Global Data Services framework, and you must install the global service manager using separate media. No other Oracle software is required to install and run the global service manager.
You can install the global service manager on a system where you have other Oracle products installed, but you must install the global service manager in a separate Oracle home directory. You can install more than one global service manager on a single system, but each global service manager must have a separate Oracle home directory. For performance reasons, depending on the number of databases in your Global Data Services configuration, you may want to deploy the global service manager on a dedicated host.
You must install at least one global service manager for each Global Data Services region. For high availability, Oracle recommends installing multiple (typically 3) global service managers in each region running on separate hosts.
Note:Oracle Universal Installer does not currently support installing software on multiple hosts. You must install each global service manager on its respective host.
Administering global service managers
Administering the Global Data Services catalog
Administering regions and database pools
Note:The Global Data Services administrator must have an operating system user account on all hosts where global service managers are deployed, and you must run the installation under that user account. The installation must not be run by a
Note:When you install the global service manager on Windows platforms, Oracle Universal Installer provides you with the option to use a Windows Built-in Account or to specify a standard Windows user Account as the Oracle Home User for the Oracle Home. This account is used for running the Windows Services for the Oracle Home and it cannot be an administrator account.
Note that LocalService account is used for running the services if Windows Built-in Account option is chosen. For administrative tasks, including global service manager installation, upgrade, and patching, you should log on using a Windows account that has administrative privileges.
See Chapter 3 of the Oracle Database Platform Guide for Microsoft Windows for details and recommendations regarding the use of Oracle Home User.
Start Oracle Universal Installer from the root directory of the software media and follow the prompts.
When the installation completes, the global service manager home directory contains binaries required to run the global service manager and the Global Service Manager Control utility (GDSCTL).
ORACLE_HOME environment variable to the directory you specified during installation.
$ORACLE_HOME/bin directory created for the global service manager to the
PATH environment variable.
TNS_ADMIN environment variable set to
Every Global Data Services configuration must have a Global Data Services catalog. The Global Data Services catalog can reside on the same host as a GDS configuration database, but Oracle does not recommend this scenario for large configurations. Oracle recommends that you use Oracle high availability features such as Oracle Real Application Clusters (Oracle RAC) and Oracle Data Guard to protect the Global Data Services catalog against outages.
The Global Data Services catalog must reside on an Oracle Database 12c (or later) database that uses a server parameter file (SPFILE).
If you create the Global Data Services catalog in an Oracle RAC database, then Oracle recommends that you set up Single Client Access Name (SCAN) for that database.
The Global Data Services administrator who creates the Global Data Services catalog must have a user account on the catalog database, and must have
GSMADMIN_ROLE privileges and an account password. For example, the following SQL statements can be executed on the catalog database.
CREATE USER gsm_admin IDENTIFIED BY out_standing1; GRANT gsmadmin_role TO gsm_admin;
Note:Oracle recommends that the Global Data Services administrator does not directly connect to the catalog database, despite having a user account on the catalog database. Global Data Services administrators can use the GDSCTL utility to manage Global Data Services. GDSCTL connects to the Global Data Services catalog with the credentials that the Global Data Services administrator provides when running GDSCTL commands.
GDSCTL> create catalog -database db_name -user user_name/password
GDSCTL> create catalog -database serv1:1521:catdb.example.com -user gsm_admin/out_standing1
In the preceding example,
serv1:1521:catdb.example.com is an Easy Connect string that contains the host name and port number of the listener that is used to connect to the database, and
catdb.example.com is the service name for the Global Data Services catalog database. The ONS.CONFIG file cannot be shared. There must be a unique file for each global service manager installation.
You designate one database as the primary repository for the Global Data Services catalog. You can use existing high availability technologies, such as Oracle RAC, Oracle Data Guard, and Oracle Clusterware, to protect the Global Data Services catalog.
"create catalog"for complete usage information
Before a global service manager can be started, the global service manager should be registered in the Global Data Services catalog.
To add a global service manager:
Every global service manager in a Global Data Services configuration maintains a direct Oracle Net Services connection to the catalog database under the
GSMCATUSER account, which is created by default during Oracle Database 12c installation. The database administrator (DBA) of the catalog database must unlock the account and give the account password (
gds_in_rdbms12c in the following example) to the Global Data Services administrator.
ALTER USER gsmcatuser ACCOUNT UNLOCK; ALTER USER gsmcatuser IDENTIFIED BY gds_in_rdbms12c;
Run the following command on the host where you want the global service manager to run:
GDSCTL> add gsm -gsm gsm_name -listener listener_port -catalog catalogdb_name
GDSCTL> add gsm -gsm east_gsm1 -listener 1523 -catalog serv1:1521:catdb.example.com
In the preceding example,
serv1:1521:catdb.example.com is the connect identifier of the catalog database. The Global Data Services administrator is prompted for the
GSMCATUSER password during the execution of the command.
"add gsm"for complete usage information
After you add the global service manager to the Global Data Services framework, start the global service manager, as follows:
GDSCTL> start gsm -gsm gsm_name
During startup, the global service manager creates or modifies the
ONS.CONFIG file and populates the file with configuration data from the Oracle Notification Service server that belongs to the global service manager.
By default, the file is created in the
$ORACLE_HOME/opmn/conf directory. The location can be changed to
$ORACLE_CONFIG_HOME/opmn/conf if the environment variable
ORACLE_CONFIG_HOME is set.
ONS.CONFIGfile cannot be shared, and there must be a unique
ONS.CONFIGfile for each global service manager installation.
Connect to the Global Data Services catalog, as follows:
GDSCTL> connect [user_name[/password]]@connect_identifier
If you run the preceding command but do not specify a password, then GDSCTL prompts you for a password, as shown in the following example:
GDSCTL> connect gsm_admin@catalog Enter password: ****** Catalog connection is established GDSCTL>
In the preceding example,
catalog is a connect identifier that resolves to one or more global service manager endpoints. For high availability, Oracle recommends that the connect identifier resolves to the list of all global service managers in the configuration. For example, if there are two global service managers in the Global Data Services configuration and you use
TNSNAMES for name resolution, then the
tnsnames.ora file must contain an entry similar to the following:
catalog = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xyz)(PORT=1523)) (ADDRESS=(PROTOCOL=tcp)(HOST=abc)(PORT=1523)) )
In the preceding example, the first global service manager runs on the host named
xyz, and the second global service manager runs on the host named
"connect"for complete usage information
To run GDSCTL commands from the operating system prompt, append the
-catalog parameter to any of the commands that require you to be connected to the Global Data Services catalog.
$ gdsctl add gdspool -gdspool hr -catalog mygdscatlog username:Robert password:
GDSCTL must use a global service manager as a listener to connect to the Global Data Services catalog because the location of the Global Data Services catalog can change. The global service manager records location changes and can route connection requests.
If you require only one Global Data Services pool, then you do not need to add one using these instructions. A default Global Data Services pool,
DBPOOLORA, is created for you when you create the Global Data Services catalog.
The Global Data Services administrator has permissions to run GDSCTL commands to manage a Global Data Services pool and, if there is only a single pool, then the Global Data Services administrator also administers the pool.
If you specify a user when you run the
gdsctl add gdspool command, then the local DBA where the Global Data Services catalog resides must first add the user to the catalog database.
Large database clouds can require multiple Global Data Services pools that are managed by different administrators. Ensure that you are connected to the Global Data Services catalog and add a pool, administered by a specific user, as follows:
GDSCTL> add gdspool -dbpool database_pool_list [-users user_list]
GDSCTL> add gdspool -dbpool hr -users rjones
The preceding example adds a Global Data Services pool called
hr, and adds the user
rjones, who is assigned the privileges to administer the
hr pool. The privileges enable the pool administrator to add databases to the pool and manage global services on the databases in the pool.
A Global Data Services pool must have a unique name within its GDS configuration. If you do not specify a name for the pool when you create it, then the name defaults to
oradbpool. The pool name can be up to 30 bytes long and can be any valid identifier (an alphabetical character followed by zero or more alphanumeric ASCII characters or the underscore (_)).
Note:If you require only one Global Data Services region, then you do not need to add a region using these instrctions. A default Global Data Services region,
REGIONORA, is created for you when you create the Global Data Services catalog.
GDSCTL> add region –region region_list
GDSCTL> add region –region west,east
The preceding example adds two regions,
west, to the Global Data Services framework.
A Global Data Services region should have a name that is unique within the corresponding Global Data Services configuration. If no name is specified at the first region creation time, the default name,
oraregion, is given to the region. The region name can be up to 30 characters long and can be any valid identifier - an alphabetical character followed by zero or more alphanumeric ASCII characters or '_'.
To provide global services, a database must be added to a Global Data Services pool. Before adding a database to a pool, the database administrator should unlock the
GSMUSER account and give the password to the Global Data Services pool administrator, as shown in the following example:
ALTER USER gsmuser ACCOUNT UNLOCK; ALTER USER gsmuser IDENTIFIED BY tro_tro!5;
To be part of a Global Data Services pool, a database must use a server parameter file (SPFILE). An Oracle RAC database should also have SCAN set up.
To add a database, the user should connect to the Global Data Services catalog using the Global Data Services pool or Global Data Services administrator credentials, for example:
and run the
gdsctl add database command:
GDSCTL>add database -connect edc007:1521/db14.east.example.com -region east -gdspool hr -pwd tro_tro!5
In this example
edc007:1521/db14.east.example.com is the connect identifier of the database and
tro_tro!5 is the GSMUSER account password on this database.
If the pool already contains databases and there are global services associated with the pool, then the services are automatically created on the new database.
The valid node checking for registration (VNCR) feature provides the ability to configure and dynamically update a set of IP addresses, host names, or subnets from which registration requests are allowed by the global service manager. Database instance registration with a global service manager succeeds only when the request originates from a valid node.
By default, the Global Data Services framework automatically adds a VNCR entry for the host on which a remote database is running each time the
gdsctl add database command is run. The automation (called auto-VNCR) requires that the host name entry exists in either the local hosts file or in the name server. If the remote host is identified by a different name on any of the nodes on which the global service manager runs, then the Global Data Services administrator must manually add VNCR entry to the Global Data Services catalog by running the
gdsctl add invitednode command.
"add invitednode (add invitedsubnet)"for complete usage information
gdsctl add service command is used to create a new service on the Global Data Services pool databases. A simple example of the command is as follows:
GDSCTL>add service -gdspool hr -service emp_report1 -preferred_all
In this example
emp_report1 is the service name and the
-preferred_all option means that the service should normally run on all of the databases in the pool.
The service name specified in the 'add service' command can be domain qualified (for example, sales.example.com) or not (for example, sales). If the specified name is not domain qualified, the service is created with the default domain name "<GDS_pool_name>.<GDS_configuration_name>", however the shorter non-domain qualified name can be used with subsequent GDSCTL commands to manage the service. If the specified name is domain qualified, the full domain qualified service name must be used in all subsequent GDSCTL commands used to manage the service.
A global service name must be unique within a GDS pool and when qualified by domain, must also be unique within a GDS configuration. A global service cannot be created at a database if a local or global service with the same name already exists at that database.
A global service name can contain alphanumeric characters, "_' and '.'. The first character must be alphanumeric. The maximum length of a global service name is 64 characters. The maximum length of a domain qualified global service name is 250 characters.
An Oracle Net connect descriptor used to connect to a global service must contain a domain qualified service name
"add service"for complete usage information
gdsctl start service command is used to start an existing service on the Global Data Services pool databases.
GDSCTL>start service -service emp_report1 -gdspool hr
-role parameter is specified for the service, the service only starts on the databases in which the role matches the specified value. If the
-lag parameter is specified for the service, the service only starts on the databases for which replication lag does not exceed the specified value. Unless
-preferred_all is specified for the service, the service only starts on the databases that are listed as preferred for the service.
Database clients connect to database services using an Oracle Net connect string. The connect string used for a global service differs from the connect string used for a local service in the following ways:
The service name parameter in the connection data section specifies a global service
Multiple connection endpoints are specified, and these endpoints are global service managers rather than local, remote, or single client access name (SCAN) listeners
The database client's region may be specified in the connection data section
Consider the following connect string:
(DESCRIPTION= (FAILOVER=on) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(host=sales-east1)(port=1522)) (ADDRESS=(host=sales-east2)(port=1522)) (ADDRESS=(host=sales-east3)(port=1522))) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(host=sales-west1)(port=1522)) (ADDRESS=(host=sales-west2)(port=1522)) (ADDRESS=(host=sales-west3)(port=1522))) (CONNECT_DATA= (SERVICE_NAME=sales) (REGION=east)))
This connect string contains three global service managers (sales-east1, sales-east2, and sales-east3) in the client's local region (east), and three global service managers (sales-west1, sales-west2, and sales-west3) in the client's buddy region (west).
Client-side load balancing is enabled across the global service managers within each region by setting the
LOAD_BALANCE parameter to ON in the address list for each region. Connect-time failover between regions is enabled by setting the
FAILOVER parameter to ON.
It is a best practice to have three global service managers in each region, for each region to have a buddy region, and for client-side load balancing and connect-time failover to be configured as shown in the example connect string.
REGION parameter is optional if only global service managers from the local region are specified in the connect string. This is the case when there is only one region in the GDS configuration, or could be the case when there are multiple regions, but it is not feasible to change the connect string of an existing client designed to work with a single database. If the
REGION parameter is not specified, the client's region is assumed to be the region of the global service manager used to connect to the global service.
Note:The pre-12c Thin JDBC client can only be used with a GDS configuration that has a single region, unless the region parameter is specified in the connect string.
The Oracle Database 12c and later integrated clients use Oracle Notification Services (ONS) to receive the Fast Application Notification (FAN) events that support load balancing and Fast Connection Failover (FCF). The integrated clients automatically subscribe, without user-configuration, to up to 3 of the ONS servers co-located with the global service managers in each of the client's local and buddy regions.
Note:Automatic ONS configuration is not supported if connections to an ONS server have to be secured using SSL. You must configure ONS manually to enable SSL. See client-specific guides for information on how to configure ONS manually.
The pre-12c OCI and ODP.NET clients do not support global services.
The pre-12c JDBC client supports global services, but you must manually configure it to subscribe to the ONS servers co-located with the global service managers in the client's local and buddy regions. It is a best practice to subscribe to three ONS servers in each of the client's local and buddy regions.
See the Oracle Database JDBC Developer's Guide for information about how to configure ONS subscriptions.
Load balancing and Fast Connection Failover (FCF) of client connections across the databases in a GDS configuration is supported by the Oracle database integrated clients, and requires that those clients be configured for FAN and FCF.
See one of these client-specific Programmer's Guides for information about that client's FAN and FCF configuration requirements: