Skip Headers
Oracle® Database Installation Guide
10g Release 2 (10.2) for hp OpenVMS

Part Number B25414-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Configuring Oracle RAC

This chapter provides an overview of the procedures for configuring Oracle RAC OpenVMS.

You may also need to refer to the following Oracle RAC documents for more complete information about installing and administering Oracle RAC on OpenVMS:

This chapter includes the following topics:

6.1 Creating Directories

If you decide to place the Oracle Clusterware, database, or recovery files on a file system, then use the following guidelines when deciding where to place them.

6.1.1 Guidelines for Placing Oracle Clusterware Files on a File System

Oracle Universal Installer does not suggest a default location for the Oracle Cluster Registry (OCR) or the Oracle Clusterware voting disk. If you choose to create these files on a file system, use the following guidelines when deciding where to place them:

  • You must choose a disk mounted and available on all the nodes in the Oracle RAC.

  • It must have at least 200 MB of free disk space for the OCR and 40 MB of free disk space for the Oracle Clusterware voting disk.

  • For improved reliability, you should choose a file system on a highly available storage device, for example, a RAID device that implements mirroring.

  • The Oracle Database account must have write permissions to create the files in the path that you specify.

6.1.2 Guidelines for Placing Oracle Database Files on a File System

If you choose to place the Oracle Database files on a file system, use the following guidelines when deciding where to place them:

  • You must select a disk that is accessible across all the nodes in the Oracle RAC

  • The default path suggested by Oracle Universal Installer for the database file directory is a subdirectory of the Oracle home directory. This default location is not recommended for production databases.

  • Choose a set of disks dedicated to the database.

    For best performance and reliability, choose a RAID device or a logical volume on more than one physical device and implement the stripe-and-mirror-everything (SAME) methodology.

    This method enables you to distribute physical I/O and create separate control files on different devices for increased reliability. You must choose either the Advanced database creation option or the Custom installation type during the installation to implement this method.

  • If you intend to create a preconfigured database during the installation, the file system (or file systems) that you choose must have at least 2.0 GB of free disk space.

    For production databases, you must estimate the disk space requirement depending on the use that you want to make of the database.

  • For optimum performance, the file systems that you choose should be on physical devices that are used only by the database.

  • The Oracle Database account must have write permissions to create the files in the path that you specify.

6.1.3 Guidelines for Placing Oracle Database Recovery Files on a File System

Note:

You must choose a location for recovery files only if you intend to enable automated backups during the installation.

If you choose to place the Oracle Database recovery files on a file system, use the following guidelines for placement of Oracle Database recovery files on the file system:

  • To prevent disk failure from making both the database files and the recovery files unavailable, place the recovery files in a file system on a different physical disk from the database files.

  • You should choose a device that is accessible on all the nodes of the Oracle RAC.

  • The device that you choose should have at least 2 GB of free disk space.

    The disk space requirement is the default disk quota configured for the flash recovery area (specified by the DB_RECOVERY_FILE_DEST_SIZE initialization parameter).

    If you choose the Custom installation type, then you can specify a different disk quota value. After you create the database, you can also use Oracle Enterprise Manager Grid Control to specify a different value.

    See Also:

    For more information about sizing the flash recovery area, refer to Oracle Database Backup and Recovery Basics
  • The default path suggested by Oracle Universal Installer for the flash recovery area is a subdirectory of the Oracle home directory. You can choose this path only if you are using an Oracle Database base directory that is on a shared file system. This default location is not recommended for production databases.

  • The oracle user must have write permissions to create the files in the path that you specify.

6.1.4 Creating Required Directories

Note:

You must perform this procedure only if you want to place the Oracle Clusterware, database, or recovery files on a file system other than where the corresponding installations were created.

To create directories for the Oracle Clusterware, database, or recovery files on separate file systems from the installations:

  1. If necessary, configure the disks that you want to use and mount them on each node.

  2. Use the $SHOW DEVICE command to determine the free disk space on each mounted file system.

  3. From the display, identify the file systems that you want to use. Table 6-1 lists the disk space requirements for each file type.

    Table 6-1 File Types and Their Disk Space Requirements

    File Type File System Requirements

    Oracle Clusterware files

    Choose a file system with at least 300 MB of free disk space

    Database files

    Choose either:

    • A single file system with at least 2.0 GB of free disk space

    • Two or more file systems with at least 2.0 GB of free disk space in total

    Recovery files

    Choose a file system with at least 2.5 GB of free disk space.


    If you are using the same disk for more than one type of file, then add the disk space requirements for each type to determine the total disk space requirement.

  4. Note the names of the disks that you identified.

  5. Enter commands similar to the following to create the recommended directories on each of these disks.

    • Oracle Clusterware file directory

      $ CREATE/DIR/OWN=Oracle_Database_account device:[ORACRS]
      
      
    • Database file directory

      $ CREATE/DIR/OWN=Oracle_Database_account device:[ORADATA]
      
      
    • Recovery file directory (flash recovery area)

      $ CREATE/DIR/OWN=Oracle_Database_account device:[FLASH_RECOVERY_AREA]
      

6.2 Using Database Configuration Assistant for Oracle RAC

The primary functions of Database Configuration Assistant processing include:

6.3 Benefits of Using Database Configuration Assistant

Oracle recommends that you use Database Configuration Assistant to create a Oracle RAC database, because Database Configuration Assistant preconfigured databases optimize the environment for features such as the server parameter file and automatic undo management.

By using Database Configuration Assistant, you can create site-specific tablespaces as a part of database creation. If you have data file requirements that differ from those offered by Database Configuration Assistant templates, then create the database with Database Configuration Assistant and modify the data files later. You can also run user-specified scripts as part of the database creation process.

Database Configuration Assistant also configures the Oracle RAC environment for various Oracle Database high-availability features such as services and cluster administration tools. It also starts any database instances required to support the defined configuration.

6.4 Oracle RAC High-Availability Services

When you configure high-availability services with Database Configuration Assistant's Database Services screen, you can also configure service instance preferences and transparent application failover (TAF) policies. These are described in the following subsections:

6.4.1 Service Configuration and Instance Preferences

Use the Database Services screen button in the column labeled Not Used, Preferred, or Available to configure service instance preferences as described in the following list:

  • Preferred: The service runs primarily on the selected instance

  • Available: The service may run on the instance if a preferred instance fails

  • Not Used: The service never runs on the instance

6.4.2 Transparent Application Failover Policies

Use Database Configuration Assistant's Database Services screen to configure TAF failover policies. Database Configuration Assistant's Database Services screen also has a TAF policy selector row under the instance preference display. Make a selection in this row for your failover and reconnection policy preference as described in the following list:

  • None: Do not use TAF

  • Basic: Establish connections at failover time

  • Preconnect: Establish one connection to a preferred instance and another connection to a backup instance that you have selected to be available

6.5 Creating the Database After Installation

To create a database by using Database Configuration Assistant in standalone mode, you must run the Oracle Net Configuration Assistant to configure the Oracle Net LISTENER.ORA file. To start Database Configuration Assistant, connect to one of the nodes with Oracle RAC installed and then enter the $DBCA command from the command line.

6.6 Creating the Oracle RAC Database

The first screen that Database Configuration Assistant displays is the Welcome screen for Oracle RAC. Database Configuration Assistant displays this Oracle RAC-specific Welcome screen only if the Oracle Database home from which it is started is cluster installed.

If Database Configuration Assistant does not display the Welcome screen for Oracle RAC, then Database Configuration Assistant was not able to detect whether or not the Oracle home is cluster installed. In this case, verify that oraInventory is not damaged and that Oracle Universal Installer inventory, ORAINST.LOC, is present. By default, this file is placed in a directory that has the same name as the node from where the installation was performed, which, in most cases, is the primary node of the Oracle RAC cluster. This directory is in the login directory of the user who carried out the installation. Otherwise, perform the following steps to create a Oracle RAC database:

  1. Select RAC database, click Next, and Database Configuration Assistant displays the Operations screen. Database Configuration Assistant enables the Configure Database Options, Delete a database, Instance Management, and Services Management options only if there is at least one Oracle RAC database configured on the cluster that runs from the Oracle Database home.

  2. Select Create a database and click Next, and Database Configuration Assistant displays the Node Selection screen.

  3. Database Configuration Assistant highlights the local node by default. Select the other nodes that you want to configure as members of the cluster database, click Next, and Database Configuration Assistant displays the Database Templates screen. If nodes that are part of the cluster installation are not displayed on the Node Selection screen, then perform inventory diagnostics and Oracle Clusterware diagnostics by running the $OLSNODES command.

  4. The templates on the Database Templates screen are Custom Database, Transaction Processing, Data Warehouse, and General Purpose. The Custom Database template does not include data files or options specially configured for a particular type of application. Use one of the other templates, which include data files, if you want to create a database with specifically configured options. Select the template from which you wish to create the cluster database, click Next, and Database Configuration Assistant displays the Database Identification screen.

  5. Enter the global database name and the Oracle Database system identifier (SID) prefix for the cluster database, click Next, and Database Configuration Assistant displays the Management Options screen.

    Note:

    The global database name can be up to 30 characters in length and must begin with an alphabetic character. The SID prefix must begin with an alphabetic character and contain no more than 5 characters on OpenVMS-based systems. Database Configuration Assistant uses the SID prefix to generate a unique value for the ORACLE_SID for each instance.
  6. On the Management Options screen, you can choose to manage the database with Enterprise Manager. Despite choosing the Grid Control option, this will only configure EMAgent on OpenVMS. The Console component of Grid Control is not supported on OpenVMS platform. Refer to Appendix D, "Installing, Configuring, and Running EMAgent" for more information about how to configure the EMagent for use with the Grid Control Enterprise Manager, and how to manage and maintain the EMAgent for the OpenVMS platform.

    Click Next, and Database Configuration Assistant displays the Database Credentials screen.

  7. Enter the passwords for the database on the Database Credentials screen. You can enter the same or different passwords for the users SYS and SYSTEM, plus DBSNMP and SYSMAN if you selected Enterprise Manager on the Management Options screen. Select the Use the Same Password for All Accounts option to assign the same password to the listed users. Alternatively, provide a different password for each of these users by selecting the Use Different Passwords option. Enter the password information, click Next, and Database Configuration Assistant displays the Storage Options screen.

  8. Use the Storage Options screen to select a storage type for database creation. The Cluster File System option is the default. Select a storage option and click Next to proceed to the next screen. If you select Cluster File System, the Database File Locations screen is displayed.

  9. The Database File Locations screen enables you to select the file storage for the database files: locations provided in a template, a common location for all database files (the files will not be Oracle Database-managed files), or Oracle Database-managed files in a common location. If you do not select the template option, then you can enter an existing directory path name in the space provided, or click Browse to open a selection list.

    If you wish to multiplex the database redo log files and control files, click Multiplex Redo Logs and Control Files and provide the location for each copy you want. Click Ok when you have defined the multiplex locations to return to the Database File Locations screen.

    You can also define variables for the file locations if you plan to use the Database Storage screen, explained in Step 14, to define individual file locations.

  10. On the Recovery Configuration screen, you can select redo log archiving by selecting Enable Archiving. You can also select the flash recovery area and size on the Recovery Configuration screen. The flash recovery area defaults to ORA_ROOT:[FLASH_RECOVERY_AREA].

    You can also define variables for the file locations if you plan to use the Database Storage screen, explained in Step 14, to define individual file locations. When you have completed the entries, click Next, and the Database Content screen is displayed.

  11. On the Database Content screen, if you chose the Custom Database option, you can select or deselect the database components and their corresponding tablespace assignment. For a seed database, you can select whether to include the sample schemas in the database and to run custom scripts as part of the database creation processing. After completing the selections, click Next to display the Databases Services screen.

  12. To create services on the Database Services screen, expand the Services tree. Oracle Database displays the global database name in the top left corner of the screen. Select the global database name and click Add to add services to the database. Enter a service name in the Add a Service dialog box, and click OK to add the service and return to the Database Services screen.

    The service name is displayed under the global database name. Select the service name and Database Configuration Assistant displays the service preferences for the service on the right side of Database Configuration Assistant Database Services screen. Change the instance preference (Not Used, Preferred, or Available) and transparent application failover (TAF) policies for the service as needed.

    Repeat this procedure for each service and when you are done configuring services for the database, click Next. Database Configuration Assistant displays the Initialization Parameters screen.

  13. By default, the Initialization Parameters screen shows only the basic parameters. Each tab on the Initialization Parameters screen provides different sets of information that you can add or modify as follows:

    1. Memory Tab

      Click Typical for default values based on the database type you selected or Custom to set values for the memory parameters. You can also see values for the advanced parameters by clicking All Initialization Parameters.

      Carefully review the parameter settings displayed in this dialog box because Database Configuration Assistant configures these settings in the server parameter file. Instance-specific parameter settings for the Oracle RAC database are displayed at the bottom of this dialog box. The sid prefixes for these entries are displayed in the left column.

      To review the instance-specific parameter settings, scroll downward using the scroll bar on the right side of the dialog box. Use the check box in the Override Default column to indicate that Database Configuration Assistant should place the parameter setting in the server parameter file. Database Configuration Assistant only places a parameter entry into the server parameter file if the entry displays a check mark in the Override Default column of the All Initialization Parameters dialog box.

      Note:

      • You cannot modify the value of sid in the Instance columnYou can alter self-tuning parameters with this dialog box. However, setting these parameters to inappropriate values may disable Oracle Database self-tuning features.You cannot specify instance-specific values for global parameters with Database Configuration Assistant.

      • You should set the value of the CLUSTER_DB_INSTANCES parameter to the number of instances you intend to use in the cluster if you are not including all the related nodes during the current Database Configuration Assistant session.

      • If the global database name is longer than eight characters, then the database name value (in the DB_NAME parameter) is truncated to the first eight characters and the DB_UNIQUE_NAME parameter value is set to the global name.

    2. Sizing Tab

      Use this screen to select the database standard block size and process count.

    3. Character Sets Tab

      Use this screen to set the database character set value.

    4. Connection Mode Tab

      You can use this tab to select either dedicated or shared database connections to the database.

    When you have specified all the information on the Initialization Parameters screen, click Next, and the Database Storage screen is displayed.

  14. If you selected a preconfigured database template, such as the General Purpose template, then Database Configuration Assistant displays the control files, data files, and redo logs on the Database Storage screen. Select the folder and the file name underneath the folder to edit the file name. However, if you selected the Custom Database template, the template without data files, then Database Configuration Assistant displays the control files, tablespaces, data files, and redo logs. To change the tablespace properties, such as the data file or the tablespace size, click the tablespaces icon to expand the object tree on the left side of the screen and click the tablespace. The tablespace property dialog box is displayed on the right side. Make the changes, and click Ok.

    After you specify all the information on the Database Storage screen, click Next, and Database Configuration Assistant displays the Creation Options screen.

  15. On the Creation Options screen, select one of the following database options and click Finish.

    • Create Database: Creates the database

    • Save as a Database Template: Creates a template that records the database structure, including user-supplied inputs, initialization parameters, and so on. You can later use this template to create a database.

    • Generate Database Creation Scripts: Generates database creation scripts. Database Configuration Assistant only displays this option if you selected the Custom Database template.

    After you click Finish, Database Configuration Assistant displays a Summary dialog box.

  16. Review the Summary dialog box information and click Ok to create the database.

After you complete Step 16, Database Configuration Assistant performs the following steps:

6.7 Deleting an Oracle RAC Database

This section explains how to delete a Oracle RAC database by using Database Configuration Assistant. This process deletes a database and removes the initialization parameter files, instances, and Oracle net configuration of the database.

To delete a database by using Database Configuration Assistant:

  1. Start Database Configuration Assistant on one of the nodes by entering the DBCA command at the DCL command prompt.

  2. Select Oracle RAC and click Next.

    After you click Next, Database Configuration Assistant displays the Operations screen.

  3. Select Delete a database, click Next, and Database Configuration Assistant displays the List of Cluster Databases screen.

  4. If your user ID and password are not authenticated by the operating system, then the List of Cluster Databases screen displays the user name and password fields. If these fields are displayed, then enter a user ID and password that has SYSDBA privileges.

  5. Select the database to delete and click Finish.

    After you click Finish, Database Configuration Assistant displays a dialog box to confirm the database and instances that Database Configuration Assistant is going to delete.

  6. Click Ok to begin the deletion of the database and its associated files, services, and environment settings, or click Cancel to stop the operation.

When you click Ok, Database Configuration Assistant continues the operation and deletes all of the associated instances for this database. Database Configuration Assistant also removes the parameter files, password files, and oratab entries.

At this point, you have accomplished the following:

6.8 Configuring Oracle RAC

The following sections describe how to use the server parameter file (SPFILE) in Oracle RAC as well as how to configure Oracle RAC once it has been installed.

See Also:

The Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide for more information about parameters and the Oracle Real Application Clusters Deployment and Performance Guide for a discussion of parallel execution-related parameters in Oracle RAC data warehouse environments

6.9 Parameter Files and Oracle RAC

Oracle Database uses parameter settings in parameter files to determine how to control various database resources. You can use two types of files for parameter administration: the server parameter file (SPFILE) or one or more traditional client-side parameter files.

Oracle recommends that you administer parameters using SPFILE. If you use client-side parameter files, then Oracle Database does not preserve parameter changes made for self-tuning after shutdown.

See Also:

The Oracle Database 10g Real Application Clusters documentation for more information about using client-side parameter files

6.10 Using Server Parameter Files in Oracle RAC

By default, Oracle Database creates the server parameter file based on one SPFILE. You can change parameter settings in the server parameter file only by using Oracle Enterprise Manager or ALTER SYSTEM SET SQL statements; the server parameter file is a binary file that you should not edit.

Note:

Oracle recommends that you avoid modifying the values for self-tuning parameters. Overriding these settings can adversely affect performance.

If you are upgrading from a previous Oracle Database release, then create and configure the server parameter file for Oracle RAC using the procedures described in the following section.

6.10.1 Location of the Server Parameter File

The default location of the server parameter file on a OpenVMS-based system is:

ORA_ROOT:[ORADATA.db_name]SPFILEsid.ORA

Oracle recommends that you use a PFILE in this directory:

ORA_ROOT:[DBS]INIToracle_sid.ora

To use Database Configuration Assistant to create the database and to use the server parameter file, on the Initialization Parameters screen select Create server parameter file (spfile) under the File Locations tab. Then enter a shared file system file name in the Server Parameters Filename field.

Note:

When you use Database Configuration Assistant to create the server parameter file, the default PFILE file name is ORA_ROOT:[DBS]INIToracle_sid.ora on OpenVMS-based systems. This is the default PFILE name.

6.11 Parameter File Search Order in Oracle RAC

Oracle Database searches for the parameter file in the following order:

  1. ORA_ROOT:[ORADATA.db_name]SPFILEsid.ORA

  2. ORA_ROOT:[ORADATA.db_name]SPFILE.ORA

  3. ORA_ROOT:[DBS]INITsid.ora

6.12 Upgrading to the Server Parameter File in Oracle RAC Environments

Upgrade to the server parameter file by creating and editing the server parameter file using the procedures described in this section.

6.12.1 Server Parameter File Placement in Oracle RAC

For single-node cluster-enabled configurations, or if you are using a cluster file system, place the server parameter file on a file system.

6.12.2 Procedures for Upgrading to the Server Parameter File

Upgrade to the server parameter file by completing the following procedures:

  1. Combine the initialization parameter files for all instances into one INITdbname.ORA file by copying all shared IFILE contents as is. All parameters defined in the IFILE parameter files are global. Therefore, create them as parameter=value without sid prefixes.

  2. Copy all instance-specific parameter definitions from INITsid.ORA files using the following syntax where sid is the sid of the instance:

    sid.parameter=value 
    
  3. Create the server parameter file using the CREATE SPFILE statement as in the following example:

    CREATE SPFILE='ORA_DB:SPFILEsid.ORA'
    FROM PFILE='ORA_ROOT:[DBS]INITsid.ORA'
    
    
  4. Oracle recommends that you use the server parameter file by running the STARTUP command as in this example:

    STARTUP PFILE=ORA_ROOT:[DBS]INITsid.ORA
    
    

    If you use this STARTUP command syntax, then Oracle Database uses the server parameter file entry specified in INITsid.ORA.

6.13 Server Parameter File Errors in Oracle RAC

Oracle Database reports errors that occur during server parameter file creation or while reading the file during startup. If an error occurs during a parameter update, then Oracle Database records the error in the ALERT.LOG file and ignores subsequent parameter updates to the file. If this happens, then do either of the following:

Oracle Database displays errors for parameter changes that you attempt when you incorrectly use the ALTER SYSTEM SET statement. Oracle Database does this when an error occurs while reading from or writing to the server parameter file.

See Also:

Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide for more information about backing up the server parameter file

6.14 Understanding the Oracle RAC Installed Configuration

The following sections describe the Oracle RAC installed configuration:

6.14.1 Understanding the Configured Environment in Oracle RAC

The Oracle Net Configuration Assistant and Database Configuration Assistant configure the environment to meet the requirements for database creation and Enterprise Manager discovery of RAC databases.

Note:

Configuration files are created on each node in the cluster database.

6.14.2 Oracle Cluster Registry in Oracle RAC

Database Configuration Assistant uses the Oracle Cluster Registry (OCR) for storing the configurations for the cluster databases that it creates. Oracle Universal Installer automatically initializes the OCR during the Oracle Clusterware installation.

6.14.3 OpenVMS oratab Configurations for Oracle RAC

Oracle Database creates an entry for each Oracle RAC database in the ORATAB configuration file. Oracle Enterprise Manager uses this file during service discovery to determine the name of the Oracle RAC database. The database entry has the following syntax:

db_unique_name:ORACLE_HOME:N

where db_unique_name is the database name for the Oracle RAC database, ORACLE_HOME is the UNIX-style directory path to the database, and N indicates that the database should not be started at startup time. A sample entry for a database named db_name is:

db_name:/DISK$PROD/ORACLE10G/10202:N

Note:

  • The notation db_name displayed in the preceding example and throughout this chapter refers to the database name you enter when prompted by Database Configuration Assistant, or it refers to the entry you made for the DATABASE keyword of the CREATE DATABASE statement.

  • The N and Y terminators to a ORATAB entry are not used on OpenVMS. Automatic restart via this mechanism is not supported.

6.15 Database Components Created Using Database Configuration Assistant

This section describes the database components that Database Configuration Assistant creates, which include:

6.15.1 Tablespaces and Data Files

For both single-instance and cluster database environments, Oracle Database is divided into smaller logical areas of space known as tablespaces. Each tablespace corresponds to one or more data files stored on a disk. Table 6-2 shows the tablespace names used by a Oracle RAC database and the types of data they contain:

Table 6-2 Tablespace Names Used by Oracle RAC Databases

Tablespace Name Contents

SYSTEM

Consists of the data dictionary, including definitions of tables, views, and stored procedures needed by the database. Oracle Database automatically maintains information in this tablespace.

SYSAUX

An auxiliary system tablespace that contains the DRSYS (contains data for OracleText), ODM (for Oracle Data Mining), TOOLS (contains Enterprise Manager tables), INDEX, and EXAMPLE tablespaces.

USERS

Consists of application data. As you create and enter data into tables, Oracle Database fills this space with your data.

TEMP

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 ANALYZE COMPUTE STATISTICS on a very large table, or the constructs GROUP BY, ORDER BY, or DISTINCT.

UNDOTBSn

These are the undo tablespaces for each instance that Database Configuration Assistant creates for automatic undo management.

RBS

If you do not use automatic undo management, then Oracle Database uses the RBS tablespace for the rollback segments.


You cannot alter these tablespace names when using the preconfigured database configuration options from 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 data files. The data file names created by the preconfigured database configuration options vary by operating system.

6.15.2 Control Files

The database is configured with two control files that are stored on shared storage.

6.15.3 Redo Log Files

Each instance is configured with at least two redo log files that are stored in the shared storage. If you selected cluster file system, then these files are shared file system files. The file names of the redo log files that are created with the preconfigured database configuration options vary by storage type.

6.16 Managing Undo Tablespaces in Oracle RAC

Oracle Database 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.

6.17 Configuring Service Registration-Related Parameters

Two key benefits of Oracle RAC are connection load balancing and failover. Oracle 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, Oracle 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 Oracle RAC occurs when the PMON process of an instance registers with the local listener and with all other listeners. Therefore, all instances in the cluster database register with all listeners running 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 Database changes the setting for REMOTE_LISTENER dynamically when you reconfigure the cluster database, for example, when you add or delete instances.

By default, Database Configuration Assistant configures the environment with dedicated servers. However, if you select the Shared server option on Database Configuration Assistant, then Oracle Database configures the shared server. In this case, Oracle Database 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 more information about cross-instance registration, shared and dedicated server configurations, and connection load balancing

6.18 Configuring the Listener File (LISTENER.ORA)

You can configure two types of listeners in the LISTENER.ORA file as described under the following headings:

6.18.1 Local Listeners

If you configured dedicated server mode by using Database Configuration Assistant Connection Mode tab on the Initialization Parameters screen, then Database Configuration Assistant 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 the TNSNAMES.ORA file located in the directory specified by the TNS_ADMIN logical name:

sid.local_listener=listener_sid

The following entry should be in the TNSNAMES.ORA file:

listener_sid=(address=(protocol=tcp)(host=node1-vip)(port=1522))

6.18.2 Multiple Listeners

If Database Configuration Assistant 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 the database.

6.18.3 How Oracle Database Uses the Listener (LISTENER.ORA)

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 nondatabase service.

Protocol addresses are configured in the listener configuration file, LISTENER.ORA, for a database service or a nondatabase 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 that you specify, as well as an address for external procedures.

Both installation modes configure service information about the Oracle RAC database and external procedures. A 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 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=disk:[oracle_home_path]) 
      (program=extproc)

6.18.3.1 Listener Registration and PMON Discovery

When a listener starts after the Oracle Database instance starts, and the listener is listed for service registration, registration does not occur until the next time the PMON discovery routine runs. 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 process 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 more information about the listener and the LISTENER.ORA file

6.19 Directory Server Access (LDAP.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 installation, then an LDAP.ORA file is created. The LDAP.ORA file contains the following types of information:

6.20 Net Service Names (TNSNAMES.ORA File)

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:

Database Configuration Assistant creates net service names for connections as follows:

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 Oracle RAC database.

A listener address is configured for each node that runs an instance of the database. The LOAD_BALANCE option causes Oracle Database to choose the address randomly. If the chosen address fails, then the FAILOVER option causes the connection request to fail over to the next address. Therefore, if an instance fails, then clients can still connect using another instance.

In the following example, db.us.acme.com is used by the client to connect to the target database, db.us.acme.com.

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:

FAILOVER=ON is set by default for a list of addresses. Therefore, you do not need to explicitly specify the FAILOVER=ON parameter.

When you set DB_UNIQUE_NAME by entering a global database name that is longer than eight characters, excluding DB_DOMAIN, then a net service entry similar to the following is created:

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, is used by Oracle Enterprise Manager to connect to an instance named db1 on db1-server:

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 Section 6.17, "Configuring Service Registration-Related Parameters", the REMOTE_LISTENER parameter identifies the global list of listeners and it is dynamic. Oracle Database changes the setting for REMOTE_LISTENER when you reconfigure the cluster database.

Whether using shared servers or dedicated servers, the list of remote listeners is supplied using the REMOTE_LISTENERS parameter, for example:

REMOTE_LISTENERS=listeners_db_unique_name

This enables the instance to register with remote listeners on the other nodes; listeners_db_unique_name is resolved through a naming method such as a TNSNAMES.ORA file.

In the following example, listeners_db.us.acme.com is resolved to a list of listeners available on the nodes on which the cluster database has instances:

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 Section 6.18.1, "Local Listeners" and Section 6.18.2, "Multiple Listeners", the LOCAL_LISTENER parameter is set in the INITsid.ORA file if a nondefault listener is configured. For example:

sid.local_listener=listener_sid

Where listener_sid is resolved to a listener address through a naming method such as a TNSNAMES.ORA file.

In the following example, listener_db1.us.acme.com is resolved to the nondefault listener address:

listener_db1.us.acme.com= 
   (address=(protocol=tcp)(host=node1-vip)(port=1522))

Services Entries

When you configure high-availability services using Database Configuration Assistant Services screen, then Database Configuration Assistant 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)
   )
   )
   )

When a service has a TAF policy of PRECONNECT, then a service_name_preconnect net service entry is also created as in the following example:

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 to connect to external procedures.

extproc_connection_data.us.acme.com= 
 (description= 
  (address_list= 
    (address=(protocol=ipc)(key=extproc0))
  (connect_data= 
    (sid=plsextproc)))

Example 6-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 more information about the TNSNAMES.ORA file

6.21 Profile (SQLNET.ORA File)

The SQLNET.ORA file is automatically configured with:

The following is a sample SQLNET.ORA file created during a preconfigured database configuration install:

names.default_domain=us.acme.com
names.directory_path=(tnsnames, ldap)

See Also:

Oracle Database Net Services Administrator's Guide for more information about the SQLNET.ORA file