In this blog we walk through the Oracle 11g (22.214.171.124) RAC database installation process in detail. Most of the required groundwork for installation was completed in the preinstallation stages. Installing the Oracle RAC software will be similar to performing a single-instance installation. Even internally, the Oracle Universal Installer (OUI) installs the binaries in a single node and uses the underlying file transfer mechanisms to propagate the files to other nodes, relinking them with the respective operating system binaries.
Oracle has introduced few changes in the Oracle 11g Release 2 database, especially in the 126.96.36.199 patchset. We will discuss the important changes in this section; changes and features introduced in Oracle RAC 11g Release 2 will be marked appropriately in this book for better readability. Starting with Oracle 11g Release 2, the database patchset will include the software binaries and support out-of-place database upgrades, thus avoiding installation of Oracle base release binaries and then upgrading to the latest patchset.
Oracle RAC One Node is another important feature introduced in Oracle RAC 11g Release 2. Oracle RAC One Node is a single-instance Oracle RAC database that runs on a single machine preconfigured with Oracle Grid Infrastructure. Also, with this release onward, the maintenance of
TIMEZONE data is simplified via
DBMS_DST PL/SQL packages, which can transparently upgrade the
TIMEZONE data without requiring clients to patch their time zone datafiles.
Oracle RAC One Node
Oracle RAC One Node is a single-instance Oracle RAC database running on a single node preconfigured with Oracle Grid Infrastructure. By utilizing the clustering technology, the Oracle RAC One Node database allows on-demand migration of database instances to other servers, conversion to Oracle RAC without any downtime, and rolling patches for single-instance databases. Oracle RAC One Node also provides high availability for single-instance databases. Oracle provides the OMOTION utility to migrate Oracle RAC One Node database instances to other servers in the cluster online without any downtime.
Oracle internally uses transaction shutdown to migrate single instances online without impacting the current transactions, but Oracle ensures that two servers do not provide the same services at the same time. This is really a welcome change in Oracle 11g Release 2 because it allows large organizations to consolidate smaller single-instance databases in one place and at the same time allows them to standardize the deployment of Oracle databases within the organization with the option to increase the scalability of single-instance databases by upgrading them to Oracle RAC databases without any downtime.
Although it is not required, the Cluster Verification Utility (cluvfy) can also be used for the pre-database installation check. You can run the Cluster Verification Utility in preinstallation mode to verify the basic node reachability and integrity of Oracle Clusterware. This also checks the basic kernel parameters and required operating system libraries. At the end, the utility checks the status of the Oracle Clusterware daemons and the network infrastructure issues. To confirm the install readiness on the hardware, run cluvfy as shown here:
$ ./runcluvfy.sh stage -pre dbinst -n alphal,alpha2,alpha3 -osdba dba Performing pre-checks for database installation <<output truncated>> Pre-check for database installation was successful on all the nodes.
That is it! Now you are ready to start the installation of RAC after deciding the storage location for the datafiles. Oracle only supports the use of RAW devices with Oracle 11g Release 2 RAC if you’re upgrading the Oracle RAC database from a previous release; otherwise, you can only use a supported cluster file system, NFS, or Oracle ASM.
Unlike the prior release of Oracle RAC, there is no need to install and configure the ASM using Oracle database binaries before the database install because ASM is installed and configured with Oracle Grid Infrastructure. Because we will be using Oracle ASM to build this Oracle RAC database, you will need to create Oracle ASM disk groups to store the Oracle data and backup.
Before installation, you can adjust the environment settings for your favorite shell and start the installer with the tracing option (see above) turned on. Tracing will help you get the current stage of the installer and debug the installation in case of failure and/or hang.
Oracle Real Application Clusters Installation
Oracle Universal Installer is used to install Oracle RAC binaries. OUI will install Oracle RAC binaries on the first node and then copy them onto the other servers in the cluster.
The cluvfy utility can be used for the pre–database configuration check, as shown next. You must run the utility as the user oracle. It is not mandatory to run the cluvfy utility to check the prerequisites because the Oracle Universal Installer will run cluvfy internally to verify all prerequisites before installing Oracle RAC 11g Release 2.
$ ./runcluvfy.sh stage -pre dbcfg -n alphal,alpha2,alpha3 -d <<output truncated>> Pre-check for database configuration was successful on all the nodes
As mentioned earlier, the Oracle RAC installation is as simple and straightforward as a single-instance environment once the prerequisites are correctly set. It can be installed from the installation media (CD-ROM or DVD) or from the staging area if the software is dumped to the disk.
Run through the following steps in an X client on only the first node in the cluster:
- Begin by running the following code:
$ cd /u01/stage/llgR2/database $ ./runlnstaller
The OUI will display the Configure Security Updates screen (see Figure 1), which allows you to specify your e-mail address registered with Oracle My Support and the password so that Oracle can notify you whenever a new security update is available. Note that this requires the database servers to be connected to the Internet, and most datacenters do not expose their database servers to the public network for security reasons. Uncheck the box labeled “I wish to receive security updates via My Oracle Support” on this screen.
FIGURE 1 The Configure Security Updates screen
- Click Next. This brings you to the Download Software Updates screen (see Figure 2), which allows you to specify Oracle My Support login details so that OUI can download the required software updates—such as any new installation requirements, known patchset updates (PSUs), and so on—from My Oracle Support automatically before starting the Oracle RAC software installation. This screen also allows you to specify a storage location where these software updates are predownloaded. We will select skip software updates on this screen because we don’t want to download software updates during this installation.
FIGURE 2 The Download Software Updates screen
- Click Next in the Download Software Updates screen to open the Select Installation Option screen (see FIGURE 3), where you specify the required installation and configuration option for the current install. This screen provides the following three installation options:
FIGURE 3 The Select Installation Option screen
- Create and configure a database This option is the default installation option, which installs Oracle RAC binaries and creates a database based on a preconfigured template. This option is useful especially for beginners because Oracle provides separate templates for different types of workloads, such as for OLTP and decision support systems.
- Install database software only This option installs only the Oracle RAC software on all the servers in the cluster. Database administrators mostly use this option, which allows them more flexibility while creating the database using the Database Configuration Assistant once Oracle RAC binaries are installed.
- Upgrade an existing database This option upgrades the existing Oracle RAC database in the cluster.
On this screen, select the option “Install database software only.”
- After specifying the installation option, click Next. In the Grid Installation Options screen (shown in Figure 4), you can choose among the following three options:
FIGURE 4 The Grid Installation Options screen
- Single instance database installation This option allows you to install single-instance database software on the local node only.
- Oracle Real Application Cluster database installation This option allows you to select and install Oracle Real Application Cluster binaries on the selected nodes in the cluster.
- Oracle RAC One Node database This option installs Oracle RAC One Node database binaries on the selected node.
On this screen, select the option “Oracle Real Application Cluster database installation.”
- After selecting the grid installation option, you will be taken to the Select Product Languages screen (see FIGURE 5), where you choose the installation language (English is selected by default). You can choose the required languages from the list available in the table.
FIGURE 5 The Select Product Languages screen
- After the Select Product Languages screen, you will be taken to the Select Database Edition screen (see FIGURE 6), where you can choose between the Enterprise and Standard Edition of the Oracle RAC database. Select the option on this screen carefully based on the purchased licenses.
FIGURE 6 The Select Database Edition screen
- Next, in the Specify Installation Location screen (see FIGURE 7), you will specify the storage location for ORACLE_BASE and ORACLE_HOME. If you are upgrading in place from a previous version (for example, 188.8.131.52), Oracle will allow you to choose the existing ORACLE_HOME; otherwise, the storage location for ORACLE_HOME will always be unique.
FIGURE 7 The Specify Installation Location screen
- In the Privileged Operating System Groups screen (see FIGURE 8), select the database administrator and the database operator OS groups from the provided list of values. You should ensure that you are selecting the correct operating system group on this screen because a wrong selection may interfere with operation of the Oracle RAC database software.
FIGURE 8 The Privileged Operating System Groups screen
- In the Perform Prerequisite Checks screen (see FIGURE 9), Oracle Universal Installer verifies the minimum requirements for installing the Oracle RAC database software. Oracle Universal Installer internally executes the Cluster Verification Utility to verify the operating system and hardware prerequisites. Based on the results of the verification tests performed by the utility, Oracle displays the failed prerequisites on this screen. Because we have run the Cluster Verification Utility before starting the installer, we do not expect any surprises at this stage.
FIGURE 9 The Perform Prerequisite Checks screen
Starting with Oracle Database 11g, OUI also provides the fix-up scripts to fix the failed but fixable prerequisite requirements. Oracle marks each failed prerequisite with a fixable status of Yes if it can be fixed by a fix-up script, which is also displayed on the screen. You can select the failed prerequisite with a fixable status Yes and click the Fix and Check Again button on this screen to fix and verify the prerequisites again. Once the installer verifies the required prerequisites successfully, click Next to continue.
- In the Summary screen (see FIGURE 10), Oracle displays the installation information. You should verify this information. You can also save this as a response file to use it for mass deployment with the silent install method. Refer to the Oracle Universal Installer Guide for running Oracle Universal Installer with a response file for automated deployment. Our step-by-step install process is known as an interactive installation process.
FIGURE 10 The Summary screen
Oracle Silent Installation
The silent installation method is used for mass deployment of Oracle products because using the interactive method to install Oracle software multiple times on multiple machines is time consuming and error prone. Also, silent install provides an option to have a uniform deployment pattern across the organization. This ensures multiple users in the organization use a standard installation option to install their Oracle products. This greatly helps the internal Oracle support teams because they already know what components and options are installed on each server and their environment settings, including locations of various trace files.
- If the information displayed is correct, click Finish to start the software installation. Installation of Oracle RAC software may take up to 30 minutes, depending on the hardware configuration. The installer will copy all the required files to the Oracle database home directory and link the files with the operating system libraries. Once the installation and linking is done at the local node, the installer will copy the files to the remote node. During the entire process, you can see the status in the progress bar of the Install Product screen (see FIGURE 11), which shows the percentage completion.
FIGURE 11 The Install Product screen
- You will be instructed to run the installation script as the superuser root. You need to open a new terminal window and run the
root.shscript as the superuser on all nodes in the cluster (see FIGURE 12). This script creates the
/etcand sets the Oracle executable permissions to the owner and group levels. The location of the file for the oratab entry is platform specific and normally found in either the
/var/opt/oracledirectory. This root.sh script must be run as the superuser root.
FIGURE 12 The root.sh screen
- After root.sh is run, go back to the installer and click the OK button to display the Finish screen (see FIGURE 13).
FIGURE 13 The Finish screen
- Click the Close button in the Finish screen to close the Oracle Universal Installer.
Creating the Oracle RAC Database
Creating the RAC database in an Oracle RAC environment is as simple as creating the database in a single-instance environment. The only change in the creation process using DBCA is to select the nodes in the Database Identification screen. Optionally, you can generate the scripts using DBCA and run them later.
To create a database using ASM for datafiles, walk through the following steps. (The number of steps may vary a bit if different storage choices are used. However, the database-creation process is the same as creating the database in the ASM environment.)
- Create the ASM disk groups that will be used to store the datafiles. Starting with Oracle 11g Release 2, the DBCA cannot be used to create the ASM disk groups. Instead, Oracle has introduced a dedicated configuration assistant called the Automatic Storage Management Configuration Assistant (also known as ASMCA) to create and manage the ASM instances, volumes, cluster file system, and disk groups. ASMCA can be launched from
$GRID_HOME/binas the grid user in the same way we will execute DBCA in the next step. We will use the DATA disk group created as part of the Oracle Grid Infrastructure installation, but the typical steps for creating an ASM disk group include marking disks to be used by ASM and then creating the ASM disk group using any ASM client, such as ASMCA, ASMCMD, or SQL*Pus.
- Start the Database Configuration Assistant (DBCA) as the user oracle. Navigate to the
$ORACLE_HOME/bindirectory. If you want to enable tracing, you need to customize the Java runtime environment to get the trace information.
DBCA enables you to create, configure, or delete a cluster database and manage database templates. If you are creating the first database in the cluster, only the Create a Database option and the Manage Template option are allowed. In the Welcome screen (see FIGURE 14), select the Oracle Real Application Clusters (RAC) Database option to create an Oracle RAC database using DBCA. Click Next.
FIGURE 14 The Welcome screen
- In creating an Oracle RAC database, you’ll select the participating nodes, whereas in a single-instance environment, the node from where DBCA is invoked is the default node for database creation. In the next screen (see FIGURE 15), choose Create a Database. Click Next.
FIGURE 15 The Operations screen
Starting with Oracle RAC 11g Release 2, DBCA can be used to create an Oracle RAC One Node database. The SRVCTL utility is also integrated with the Oracle RAC One Node database and can be used to relocate the Oracle RAC One Node database to another server. In Oracle RAC 11g Release 2, you create an Oracle RAC One Node database by creating and converting the newly created Oracle RAC database.
- Predefined database configuration templates are available to make the process easier. In the Database Templates screen (see FIGURE 16), Oracle provides predefined templates that can be used to create a new database based on the expected type of workload. These templates come with datafiles, but you can use these templates without datafiles if you want to customize database attributes such as block size. This screen displays three options: General Purpose or Transaction Processing, Custom Database, and Data Warehouse. Each option provides preconfigured parameters/attributes for the new database, and Custom Database allows you to decide these attributes and parameters. Regardless of your choice on this screen, you can still customize the database in later steps. Choose the General Purpose or Transaction Processing option on this screen and click Next.
FIGURE 16 The Database Templates screen
- In the Database Identification screen (see FIGURE 17), you select the global name of this cluster database and a prefix to be used for the database service identifier. Starting with Oracle RAC 11g Release 2, Oracle has introduced two different configuration schemes for the cluster database. On this screen, you choose between an admin-managed and policy-managed configuration for this database. These different configurations allow you to further improve the resource utilization in the Oracle RAC database. If Oracle Clusterware is up and running, the Database Configuration Assistant will automatically detect the cluster and the number of nodes in the cluster and then populate the node names in this screen. Select the Admin-Managed option and enter RAC in the Global Database Name and SID Prefix fields on this screen. The local node is selected by default, so click Select All and then click Next.
FIGURE 17 The Database Identification screen
Admin-Managed and Policy-Managed Oracle RAC Database
An admin-managed Oracle RAC database is a traditional configuration approach where you can specify the servers in the cluster that will run the Oracle RAC database instances. You can also decide the preferred and available Oracle RAC database instances for a given database service. In a policy-managed Oracle RAC database, you don’t have flexibility to decide which server in the cluster will run the Oracle RAC database instance. Oracle will start the number of Oracle RAC database instances on servers in a server pool based on the cardinality of the Oracle RAC database.
In an admin-managed RAC database, there is a relation/association between the database service and the Oracle RAC database instance, whereas in a policy-managed Oracle RAC database, there is a relation between a database service and the server pool because Oracle will automatically decide the RAC database instance, which will serve a given database service. A server pool is a pool of different servers in the cluster, which Oracle uses to automatically host database instances. You should always have a number of servers in the server pool greater than the number of Oracle RAC database instances specified in cardinality. The CRSCTL and SRVCTL utilities can be used to create and manage server pools in an Oracle RAC database.
- You can use the Oracle Enterprise Manager to manage the database. In the Management Options screen (see FIGURE 18), if you would like to use the Enterprise Manager to manage this database, check Configure Enterprise Manager. If the Oracle Grid Control agent is running on the local node and the Oracle Grid Control is installed and working in your network, you can register and manage this database with the Oracle Grid Control environment. Alternatively, you can use Oracle Database Control for Local Management. You have options to configure notification and backups using the database control as well. Uncheck the Configure Enterprise Manager option on this screen and click Next.
FIGURE 18 The Management Options screen
- In the next screen, you are asked to enter the passwords for the
SYSMANaccounts (see FIGURE 19). In earlier Oracle versions, the SYS and SYSTEM accounts used a default password (for SYS, it was change_on_install, and for SYSTEM, it was manager). Because no default passwords for these administrative accounts exist in Oracle Database 10g and onward, select the Use the Same Password for All Accounts option, enter and confirm the password, and click Next. Optionally, you can use different passwords for these administrative accounts by choosing the Use Different Administrative Passwords option.
FIGURE 19 The Administrative Passwords screen
- In the next screen, specify the storage type and database file location for the database (see FIGURE 20). The available storage types are Cluster File System and Automatic Storage Management, which can be selected from the Storage Type drop-down list. Starting with Oracle 11g Release 2, RAW devices are not supported. Choose Automatic Storage Management from the Storage Type drop-down list because we will be using ASM for this cluster database. In this screen, Oracle allows you to select database files location from a template; you can store the database file onto a common location or you can let Oracle manage these database files for you using the Oracle-Managed Files mechanism. Select the Use Oracle-Managed Files option for the storage location and then click Next.
IGURE 5-20 The Database File Location screen
- In the next screen, you specify the FastRecovery Area used to store Oracle database backup files, including archive and flash logs (see FIGURE 21). You can specify the size of the Fast Recovery Area in the Fast Recovery Area Size field. Oracle will not use more space in the ASM disk group than the Fast Recovery Area size. In this screen, you can also enable redo log archiving by selecting the Enable Archiving check box. We will not use Fast Recovery Area and archiving in our installation process, so uncheck Specify Fast Recovery Area and Enable Archiving on this screen and then click Next.
FIGURE 21 The Recovery Configuration screen
Fast Recovery Area
Fast Recovery Area (also known as Flash Recovery Area in previous database releases) is a dedicated storage location Oracle uses to store all database backup-related files so that in an event of database recovery Oracle can quickly restore backup pieces from this dedicated storage location rather than fetching from the slow tape libraries. This storage is configured using two database initialization parameters:
DB_RECOVERY_FILE_DEST_SIZE. Oracle manages this storage area and automatically purges obsolete backups based on the backup retention policies.
- In the Database Content screen, you can choose to create sample schemas—a set of schemas that can be used for training purposes (see FIGURE 22). These include the infamous EMP and DEPT tables. In the Custom Scripts tab, you can select your custom scripts to be run as part of the database creation process. Click Next.
FIGURE 22 The Database Content screen
- In the Initialization Parameters screen, you can specify the initialization parameters that control the memory used by the Oracle database (FIGURE 23). Most of the tuning parameters can be changed later. In the Character Sets tab, along with the character set you can select the default language and date format for this database. In the Connection Mode tab, you can specify the connection mode for the database. By default, Oracle uses the Dedicated Server mode. The only important thing you must be aware of at this stage is the character set and block size for the database. Choose the appropriate character set and block size and leave the rest of the initialization parameters set to their defaults. You can refine these later.
FIGURE 23 The Initialization Parameters screen
- Click Next to open the Database Storage screen (see FIGURE 24). Here you can specify the locations for the datafiles, control files, and redo log groups. File location variables for datafiles and redo logs can also be specified. Once you have specified the locations for the datafiles, control files, and redo log groups, you are ready to create the database. You can create a database immediately or generate scripts for database creation.
FIGURE 24 The Database Storage screen
- If you create the database immediately, it is a good practice to generate the scripts to be able to see what is being run and to have these scripts available for future reference. You can choose the location of the scripts in any local directory. By default, they are stored under
$ORACLE_BASE/admindirectory, as shown in FIGURE 25.
FIGURE 25 The Creation Options screen
- Click Finish to view the Summary screen (see FIGURE 26). This screen contains the selected options for the installation. Click OK. After the database is created, click Exit to start the database instances.
FIGURE 26 The Summary screen
This blog covered the installation process of Oracle Database 11g Release 2 RAC in detail. The number of steps in the installation may vary slightly depending on the options and configurations selected. We walked through the important changes that Oracle has introduced in Oracle RAC Database 11g Release 2, such as Oracle RAC One Node and the admin- and policy-managed configurations of the Oracle RAC database.
Oracle RAC One is a newly introduced option that helps build a single-database infrastructure that’s ready for the high-availability features provided by Oracle Grid Infrastructure. Instance failures are detected by Oracle Clusterware and automatically restarted in another server in the server pool, which ensures failover protection for Oracle RAC One Node.
Unlike previous releases of Oracle RAC, there is no need to install and configure ASM separately because ASM is part of Oracle Grid Infrastructure and configured during Oracle Grid Infrastructure installation and configuration.
Oracle RAC 11g Release 2 video installation instructions
How to install Oracle RAC 11g Release 2 and configure database - see in this video. Oracle RAC tutorial with simplest steps to install Oracle 11g R2 RAC configuration and database configuration guidelines.