Oracle® Database Oracle Clusterware and Oracle Real Application Clusters Installation Guide 10g Release 2 (10.2) for Microsoft Windows Part Number B14207-02 |
|
|
View PDF |
This chapter describes the Oracle Real Application Clusters (RAC) installed configuration. The topics in this chapter include:
Understanding the Configured Environment in Real Application Clusters
Database Components Created Using the Database Configuration Assistant
Configuring Service Registration-Related Parameters in Real Application Clusters
The Oracle Net Configuration Assistant (NetCA) and the Database Configuration Assistant (DBCA) configure your environment to meet the requirements for database creation and Enterprise Manager discovery of Real Application Cluster databases.
Note: Configuration files are created on each node in your cluster database. |
The Database Configuration Assistant uses the Oracle Cluster Registry (OCR) for storing the configurations for the cluster databases that it creates. The OCR is a shared file in a cluster file system environment. If you do not use a cluster file system, then you must make this file a shared raw device. The Oracle Universal Installer (OUI) automatically initializes the OCR during the Oracle Clusterware installation.
This section describes the database components that DBCA creates, which include:
An Oracle database for both single-instance and cluster database environments is divided into smaller logical areas of space known as tablespaces. Each tablespace corresponds to one or more datafiles stored on a disk. Table 9-1 shows the tablespace names used by a RAC database and the types of data they contain:
Table 9-1 Tablespace Names that Real Application Clusters Databases Use
Tablespace Name | Contents |
---|---|
Consists of the data dictionary, including definitions of tables, views, and stored procedures needed by the database. Oracle automatically maintains information in this tablespace. |
|
|
An auxiliary system tablespace that contains the |
Consists of application data. As you create and enter data into tables, Oracle fills this space with your data. |
|
Contains temporary tables and indexes created during SQL statement processing. You may need to expand this tablespace if you are running a SQL statement that involves significant sorting, such as |
|
These are the undo tablespaces for each instance that DBCA creates for automatic undo management. |
|
If you do not use automatic undo management, then Oracle uses the |
You cannot alter these tablespace names when using the preconfigured database configuration options from the Oracle Universal Installer. However, you can change the names of the tablespaces if you use the advanced database creation method.
As mentioned, each tablespace has one or more datafiles. The datafile names created by the preconfigured database configuration options vary by storage type such as ASM, OFS, raw devices, and so on.
You can specify different symbolic names with the Advanced database configuration option.
Windows-based platforms use the symbolic link names for the datafile and other database files shown in Table 9-2:
Table 9-2 Windows-Based Platforms Symbolic Link Names and Files
The database is configured with two control files that are stored on shared storage.
Each instance is configured with at least two redo log files that are stored in the shared storage. If you chose cluster file system, then these files are shared file system files. If you do not have a cluster file system, then these files are raw devices. If you use ASM, then these files are stored on the ASM disk group.
The file names of the redo log files that are created with the preconfigured database configuration options vary by storage type. You must enter the raw device names unless you are using a cluster file system.
When using raw devices, to use the advanced database creation method, locate the redo log files in the Database Storage page and replace their default filenames with the correct raw device names or symbolic link names.
Oracle stores rollback or undo information in undo tablespaces. To manage undo tablespaces, Oracle recommends that you use automatic undo management. Automatic undo management is an automated undo tablespace management mode that is easier to administer than manual undo management.
See Also: Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide for more information about managing undo tablespaces |
Oracle recommends using the server parameter file (SPFILE). This file resides on the server on the shared disk; all instances in a cluster database can access this parameter file.
See Also: Chapter 8, " Parameter Management for Real Application Clusters Databases" for more information about the creation and use of parameter files |
Two key benefits of RAC are connection load balancing and failover. RAC extends the ability of single-instance Oracle database load balancing, where connections are distributed among local dispatchers, to the balancing of connections among all instances in a cluster database. In addition, RAC provides failover by configuring multiple listeners on multiple nodes to manage client connection requests for the same database service. Connection load balancing and failover increase availability by taking advantage of the redundant resources within a cluster database. These features, however, require cross instance registration.
Cross instance registration in RAC occurs when an instance's PMON process registers with the local listener and with all other listeners. Thus, all instances in the cluster database register with all listeners that run on nodes that run instances of the cluster database. This enables all listeners to manage connections across all instances for both load balancing and failover.
Cross instance registration requires configuring the LOCAL_LISTENER
and REMOTE_LISTENER
initialization parameters. The LOCAL_LISTENER
parameter identifies the local listener and the REMOTE_LISTENER
parameter identifies the global list of listeners. The REMOTE_LISTENER
parameter is dynamic. Oracle changes the setting for REMOTE_LISTENER
dynamically when you reconfigure your cluster database, for example, when you add or delete instances.
By default, DBCA configures your environment with dedicated servers. However, if you select the Shared server option on DBCA, then Oracle configures the shared server. In this case, Oracle uses both dedicated and shared server processing. When shared servers are configured, the DISPATCHERS
parameter is specified as in the following example:
DISPATCHERS="(protocol=tcp)"
If the DISPATCHERS
initialization parameter does not specify the LISTENER
attribute as in the previous example, then the PMON process registers information for all dispatchers with the listeners specified by the LOCAL_LISTENER
and REMOTE_LISTENER
parameters.
However, when the LISTENER
attribute is specified, the PMON process registers dispatcher information with the listeners specified by the LISTENER
attribute. In this case, setting the LISTENER
attribute overrides REMOTE_LISTENER
settings for the specified dispatchers as in the following example:
DISPATCHERS="(protocol=tcp)(listener=listeners_db_name)"
See Also: Oracle Database Net Services Administrator's Guide for further information about cross instance registration, shared and dedicated server configurations, and connection load balancing |
You can configure two types of listeners in the listener.ora
file as described under the following headings:
If you configured dedicated server mode using the DBCA Connection Mode tab on the Initialization Parameters page, then DBCA automatically configures the LOCAL_LISTENER
parameter when the listener uses a nondefault address port.
If you configured the dedicated server mode by setting the REMOTE_LISTENER
initialization parameter, then you must also configure the instance-specific LOCAL_LISTENER
initialization parameter.
For example, to configure the LOCAL_LISTENER
parameter, add the following entry to the initialization parameter file, where listener_
sid
is resolved to a listener address through either a tnsnames.ora
file or through the Oracle Names Server:
sid.local_listener=listener_sid
The following entry should be in your tnsnames.ora
file:
listener_sid=(address=(protocol=tcp)(host=node1-vip)(port=1522))
If DBCA detects more than one listener on the node, it displays a list of the listeners. You can select one or all of these listeners with which to register your database.
Services coordinate their sessions using listener file entries by running a process on the server that receives connection requests on behalf of a client application. Listeners are configured to respond to connection requests sent to protocol addresses for a database service or non-database service.
Protocol addresses are configured in the listener configuration file, listener.ora
, for a database service or a non-database service. Clients configured with the same addresses can connect to a service through the listener.
During a preconfigured database configuration installation, the Oracle Net Configuration Assistant creates and starts a default listener called LISTENER_
NODENAME
. The listener is configured with a default protocol listening addresses for the database and external procedures. The advanced installation process prompts you to create at least one listener with the Oracle Net Configuration Assistant. The listener is configured to respond to connection requests that are directed at one protocol address you specify, as well as an address for external procedures.
Both installation modes configure service information about the RAC database and external procedures. An Oracle Database 10g Release 2 (10.2) database service automatically registers its information with the listener, such as its service name, instance names, and load information.
This feature, called service registration, does not require configuration in the listener.ora
file. After listener creation, the Oracle Net Configuration Assistant starts the listener. A sample listener.ora
file with an entry for an instance named node1
is:
listener_node1= (description= (address=(protocol=ipc)(key=extproc)) (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node1-ip)(port=1521))) sid_list_listener_node1= (sid_list= (sid_desc= (sid_name=plsextproc) (oracle_home=/private/system/db) (program=extproc)
When a listener starts after the Oracle instance starts, and the listener is listed for service registration, registration does not occur until the next time the PMON discovery routine starts. By default, PMON discovery occurs every 60 seconds.
To override the 60-second delay, use the SQL ALTER SYSTEM REGISTER statement. This statement forces PMON to register the service immediately.
Oracle recommends that you create a script to run this statement immediately after starting the listener. If you run this statement while the listener is up and the instance is already registered, or while the listener is down, then the statement has no effect.
See Also: Oracle Database Net Services Administrator's Guide for further information about the listener and thelistener.ora file |
If you configure access to a Lightweight Directory Access Protocol (LDAP)-compliant directory server with the Oracle Net Configuration Assistant during a Custom Install or Advanced database configuration, an ldap.ora
file is created. The ldap.ora
file contains the following types of information:
Type of directory
Location of the directory
Administrative context from which this server can look up, create, and modify a net service name, and the database service entries
See Also: Oracle Database Net Services Administrator's Guide for further information about directory naming configuration and directory server access configuration |
A tnsnames.ora
file is created on each node with net service names. A connect identifier is an identifier that maps to a connect descriptor. A connect descriptor contains the following information:
The network route to the service, including the location of the listener through a protocol address
The SERVICE_NAME
for an Oracle release 8.1 or later, or SID
for pre-8.1 Oracle releases
Note: TheSERVICE_NAME parameter you use in tnsnames.ora is singular because you can only specify one service name. |
DBCA creates net service names for connections as shown in Table 9-3:
Table 9-3 Connections for Net Service Names
Net Service Name Type | Description |
---|---|
Database connections |
Clients that connect to any instance of the database use the net service name entry for the database. This entry also enables Oracle Enterprise Manager to discover a RAC database. A listener address is configured for each node that runs an instance of the database. The In the following example, db.us.acme.com= (description= (load_balance=on) (address=(protocol=tcp)(host=node1-vip)(port=1521) (address=(protocol=tcp)(host=node2-vip)(port=1521) (connect_data= (service_name=db.us.acme.com))) Note: When you set mydatabase.us.acme.com= (description = (address = (protocol = tcp)(host = node1-vip)(port = 1521)) (address = (protocol = tcp)(host = node2-vip)(port = 1521)) (load_balance = yes) (connect_data = (server = dedicated) (service_name = mydatabase.us.acme.com) ) ) |
Instance connections |
Clients that connect to a particular instance of the database use the net service name entry for the instance. This entry, for example, enables Oracle Enterprise Manager to discover the instances in the cluster. These entries are also used to start and stop instances. In the following example, db1.us.acme.com= (description= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (connect_data= (service_name=db.us.acme.com) (instance_name=db1))) |
Remote listeners |
As discussed in "Configuring Service Registration-Related Parameters in Real Application Clusters", the Whether using shared servers or dedicated servers, the list of remote listeners is supplied using the REMOTE_LISTENERS=listeners_db_unique_name
This enables the instance to register with remote listeners on the other nodes; In the following example, listeners_db.us.acme.com= (address_list= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521))) The instance uses this list to determine the addresses of the remote listeners with which to register its information. |
Nondefault listeners |
As discussed in "Local Listeners" and "Multiple Listeners", the sid.local_listener=listener_sid Where In the following sample, listener_db1.us.acme.com= (address=(protocol=tcp)(host=node1-vip)(port=1522)) |
Services Entries |
When you configure high availability services using the DBCA Services page, then DBCA creates net service entries similar to the following. The three services in the following examples, db_svc1, db_svc2, and db_svc3, have TAF policies of NONE, BASIC and PRECONNECT respectively. db_svc1.us.acme.com= (description = (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521)) (load_balance=yes) (connect_data= (server = dedicated) (service_name = db_svc1.us.acme.com) ) ) db_svc2.us.acme.com= (description= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521)) (load_balance=yes) (connect_data = (server = dedicated) (service_name=db_svc2.us.acme.com) (failover_mode = (type=select) (method=basic) (retries=180) (delay=5) ) ) ) db_svc3.us.acme.com= (description= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521)) (load_balance=yes) (connect_data= (server=dedicated) (service_name=db_svc3.us.acme.com) (failover_mode= (backup=db_svc3_preconnect.us.acme.com) (type=select) (method=preconnect) (retries=180) (delay=5) ) ) ) |
Services Entries (continued) |
When a service has a TAF policy of db_svc3_preconnect.us.acme.com = (description = (address = (protocol = tcp)(host = node1-vip)(port = 1521)) (address = (protocol = tcp)(host = node2-vip)(port = 1521)) (load_balance = yes) (connect_data = (server = dedicated) (service_name = db_svc3_preconnect.us.amce.com) (failover_mode = (backup = db_svc3.us.acme.com) (type = select) (method = basic) (retries = 180) (delay = 5) ) ) ) |
External procedures |
An entry for connections to external procedures. This enables an Oracle Database 10g database to connect to external procedures. extproc_connection_data.us.acme.com= (description= (address_list= (address=(protocol=ipc)(key=extproc0)) (connect_data= (sid=plsextproc))) |
Example 9-1 Example tnsnames.ora File
The following is a sample tnsnames.ora
file that is created during a preconfigured database configuration installation:
db.us.acme.com= (description= (load_balance=on) (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521)) (connect_data= (service_name=db.us.acme.com))) db1.us.acme.com= (description= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (connect_data= (service_name=db.us.acme.com) (instance_name=db1))) db2.us.acme.com= (description= (address=(protocol=tcp)(host=node2-vip)(port=1521)) (connect_data= (service_name=db.us.acme.com) (instance_name=db2))) listeners_db.us.acme.com= (address_list= (address=(protocol=tcp)(host=node1-vip)(port=1521)) (address=(protocol=tcp)(host=node2-vip)(port=1521))) extproc_connection_data.us.acme.com= (description= (address_list= (address=(protocol=ipc)(key=extproc))) (connect_data= (sid=plsextproc) (presentation=RO)))
See Also: Oracle Database Net Services Administrator's Guide for further information about thetnsnames.ora file |
The sqlnet.ora
file is automatically configured with:
The computer's domain
This domain is automatically appended to any unqualified net service name. For example, if the default domain is set to us.acme.com
, then Oracle resolves db
in the connect string CONNECT scott/tiger@db
as: db.us.acme.com
.
A naming method the server uses to resolve a name to a connect descriptor
The order of naming methods is as follows: directory naming (for Custom Install or Advanced database configuration options only), tnsnames.ora
file, Oracle Names server, and host naming.
The following is a sample sqlnet.ora
file created during a preconfigured database configuration install:
SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
See Also: Oracle Database Net Services Administrator's Guide for further information about thesqlnet.ora file |