3.0 Preparing for the installation of RAC
The Real Application Clusters installation process includes four major tasks.
- Configure the shared disks and UNIX preinstallation tasks.
- Run the Oracle Universal Installer to install the Oracle9i Enterprise Edition and the Oracle9i Real Application Clusters software.
- Create and configure your database.
3.1 Configure the shared disks and UNIX preinstallation tasks
3.1.1 Configure the shared disks
Real Application Clusters requires that all each instance be able to access a set of unformatted devices on a shared disk subsystem if GPFS is not being used. These shared disks are also referred to as raw devices. If your platform supports an Oracle-certified cluster file system, however, you can store the files that Real Application Clusters requires directly on the cluster file system.
Note: If you are using Parallel Filesystem (GPFS), however, you can store the files that Real Application Clusters requires
directly on the cluster file system !
The Oracle instances in Real Application Clusters write data onto the raw devices to update the control file, server parameter file, each datafile, and each redo log file. All instances in the cluster share these files.
The Oracle instances in the RAC configuration write information to raw devices defined for:
- The control file
- The spfile.ora
- Each datafile
- Each ONLINE redo log file
- Server Manager (SRVM) configuration information
It is therefore necessary to define raw devices for each of these categories of file. The Oracle Database Configuration Assistant (DBCA) will create a seed database expecting the following configuration:
- Raw VolumeFile SizeSample File Name
SYSTEM tablespace 400 Mbdb_name_raw_system_400m USERS tablespace 120 Mbdb_name_raw_users_120m TEMP tablespace 100 Mbdb_name_raw_temp_100m UNDOTBS tablespace per instance 312 Mbdb_name_raw_undotbsx_312m CWMLITE tablespace 100 Mbdb_name_raw_cwmlite_100m EXAMPLE 160 Mbdb_name_raw_example_160m OEMREPO 20 Mbdb_name_raw_oemrepo_20m INDX tablespace 70 Mbdb_name_raw_indx_70m TOOLS tablespace 12 Mbdb_name_raw_tools_12m DRYSYS tablespace 90 Mbdb_name_raw_drsys_90m First control file 110 Mbdb_name_raw_controlfile1_110m Second control file 110 Mbdb_name_raw_controlfile2_110m Two ONLINE redo log files per instance 120 Mb x 2db_name_thread_lognumber_120m spfile.ora 5 Mbdb_name_raw_spfile_5m srvmconfig 100 Mbdb_name_raw_srvmconf_100m
Note: Automatic Undo Management requires an undo tablespace per instance therefore you would require a minimum of 2 tablespaces as described above. By following the naming convention described in the table above, raw partitions are identified with the database and the raw volume type (the data contained in the raw volume). Raw volume size is also identified using this method.
Note: In the sample names listed in the table, the string db_name should be replaced with the actual database name, thread is the thread number of the instance, and lognumber is the log number within a thread.
On the node from which you run the Oracle Universal Installer, create an ASCII file identifying the raw volume objects as shown above. The
DBCA requires that these objects exist during installation and database creation. When creating the ASCII file content for the objects, name them
using the format:
database_object=raw_device_file_path
When you create the ASCII file, separate the database objects from the paths with equals (=) signs as shown in the example below:
system1=/dev/rdb_name_system_400m
spfile1=/dev/rdb_name_spfile_5m
users1=/dev/rdb_name_users_120m
temp1=/dev/rdb_name_emp_100m
undotbs1=/dev/rdb_name_undotbs1_312m
undotbs2=/dev/rdb_name_undotbs2_312m
example1=/dev/rdb_name_example_160m
cwmlite1=/dev/rdb_name_cwmlite_100m
indx1=/dev/rdb_name_indx_70m
tools1=/dev/rdb_name_tools_12m
drsys1=/dev/rdb_name_drsys_90m
control1=/dev/rdb_name_cntrl1_110m
control2=/dev/rdb_name_cntrl2_110m
redo1_1=/dev/rdb_name_log11_120m
redo1_2=/dev/rdb_name_log12_120m
redo2_1=/dev/rdb_name_log21_120m
redo2_2=/dev/rdb_name_log22_120m
You must specify that Oracle should use this file to determine the raw device volume names by setting the following environment variable where filename
is the name of the ASCII file that contains the entries shown in the example above:
csh:
setenv DBCA_RAW_CONFIG filename
ksh, bash or sh:
DBCA_RAW_CONFIG=filename; export DBCA_RAW_CONFIG
3.1.2 UNIX Preinstallation Steps
Note: In addition, you can run the installPrep.sh script provided in Note 189256.1 which catches most unix environment problems.
After configuring the raw volumes, perform the following steps prior to installation as root user:
Add the Oracle USER
- Make sure you have an osdba group defined in the /etc/group file on all nodes of your cluster. To designate an osdba group name and group number and osoper group during installation, these group names must be identical on all nodes of your UNIX cluster that will be part of the Real Application Clusters database. The default UNIX group name for the osdba and osoper groups is dba . There also needs be an oinstall group which the software owner should have as its primary group. A typical entry would therefore look like the following:
dba::101:oracle
oinstall::102:root,oracle -
The following is an example of the command used to create the "dba" group with a group ID of "101":
# mkgroup -'A' id='101' users='oracle' dba
- Create an oracle account on each node so that the account:
- Is a member of the osdba group (dba in this example)
- Has oinstall as its primary group
- Is used only to install and update Oracle software
- Has write permissions on remote directories
The following is an example of the smit command used to create the "oracle" user:
Smit -> Security & Users -> Users -> Add a User
-
Fastpath:
-
# smit mkuser
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP]
[Entry Fields]
* User NAME [oracle]
User
ID [101] #
ADMINISTRATIVE USER? false +
Primary GROUP [oinstall] +
Group SET [] +
ADMINISTRATIVE GROUPS [] +
ROLES [] +
Another user can SU TO USER? true +
SU GROUPS [ALL] +
HOME directory [/home/oracle]
Initial PROGRAM [/bin/ksh]
User INFORMATION []
EXPIRATION date (MMDDhhmmyy) [0]
Note that the primary group is not "dba". The "use" of "oinstall" is optional but recommended. For more information on the use of the "oinstall" group see the : Oracle9i Installation Guide Release 2 (9.X.X.X.0) for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel and Sun SPARC Solaris documentation.
- Create a mount point directory on each node to serve as the top of your Oracle software directory structure so that:
- The name of the mount point on each node is identical to that on the initial node
- The oracle account has read, write, and execute privileges
- On the node from which you will run the Oracle Universal Installer, set up user equivalence by adding entries for all nodes in the cluster, including the local node, to the .rhosts file of the oracle account, or the /etc/hosts.equiv file.
- As oracle account user, check for user equivalence for the oracle account by performing a remote login (rlogin ) to each node in the cluster.
- As oracle account user, if you are prompted for a password, you have not given the oracle account the same attributes on all nodes. You must
correct this because the Oracle Universal Installer cannot use the rcp command to copy Oracle products to the remote node's directories without
user equivalence.
Establish system environment variables
- Set a local bin directory in the user's PATH, such as /usr/local/bin , or /opt/bin . It is necessary to have execute permissions on this directory.
- Set the DISPLAY variable to point to the system's (from where you will run OUI) IP address, or name, X server, and screen.
- Set a temporary directory path for TMPDIR with at least 20 Mb of free space to which the OUI has write permission.
Establish Oracle environment variables : Set the following Oracle environment variables:
- Environment VariableSuggested value
ORACLE_BASE eg /u01/app/oracle ORACLE_HOME eg /u01/app/oracle/product/901 ORACLE_TERM xterm NLS_LANG AMERICAN-AMERICA.UTF8 for example ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data PATH Should contain $ORACLE_HOME/bin CLASSPATH $ORACLE_HOME/JRE:$ORACLE_HOME/jlib /
$ORACLE_HOME/rdbms/jlib: /
$ORACLE_HOME/network/jlib
- Create the directory /var/opt/oracle and set ownership to the oracle user.
Note: There is a verification script InstallPrep.sh available which may be downloaded and run prior to the installation of Oracle Real Application Clusters. This script verifies that the system is configured correctly according to the Installation Guide. The output of the script will report any further tasks that need to be performed before successfully installing Oracle 9.x DataServer (RDBMS). This script performs the following verifications:-
ORACLE_HOME Directory Verification
UNIX User/umask Verification
UNIX Group Verification
Memory/Swap Verification
TMP Space Verification
Real Application Cluster Option Verification
Unix Kernel Verification
./InstallPrep.sh
You are currently logged on as oracle
Is oracle the unix user that will be installing Oracle Software? y or n
y
Enter the unix group that will be used during the installation
Default: dba
dba
Enter Location where you will be installing Oracle
Default: /u01/app/oracle/product/oracle9i
/u01/app/oracle/product/9.2.0.1
Your Operating System is AIX
Gathering information... Please wait
Checking unix user ...
user test passed
Checking unix umask ...
umask test passed
Checking unix group ...
Unix Group test passed
Checking Memory & Swap...
Memory test passed
/tmp test passed
Checking for a cluster...
AIX Cluster test
Cluster has been detected
You have 2 cluster members configured and 2 are curently up
No cluster warnings detected
Processing kernel parameters... Please wait
Running Kernel Parameter Report...
Check the report for Kernel parameter verification
Completed.
/tmp/Oracle_InstallPrep_Report has been generated
Please review this report and resolve all issues before attempting to install the Oracle Database Software
3.2 Using the Oracle Universal Installer for Real Application Clusters
Follow these procedures to use the Oracle Universal Installer to install the Oracle Enterprise Edition and the Real Application Clusters software. Oracle9i is supplied on multiple CD-ROM disks. During the installation process it is necessary to switch between the CD-ROMS. OUI will manage the switching between CDs. For the latest RAC/IBM certification matrix see here .
To install the Oracle Software, perform the following:.
- Login as the root user and mount the first CD-ROM if installing from CD-ROM
# mount -rv cdrfs /dev/cd0 /cdrom
- Execute the "rootpre.sh" shell script on the CD-ROM mount point or the location of Disk1 if installing from a disk stage. See the Oracle9i Installation Guide Release 2 (9.X.X.X.0) for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel and Sun SPARC Solaris documentation for more information on creating disk stages.
# /<Location_Of_Install_Media>/rootpre.sh - Login as the oracle user and execute the "runInstaller". See <Note:153960.1> if you experience problems starting the runInstaller.
$ /<Location_Of_Install_Media>/runInstaller
- At the OUI Welcome screen, click Next .
- A prompt will appear for the Inventory Location (if this is the first time that OUI has been run on this system). This is the base directory into which OUI will install files. The Oracle Inventory definition can be found in the file /etc/oraInst.loc . Click OK .
- Verify the UNIX group name of the user who controls the installation of the Oracle9i software. If an instruction to run /tmp/orainstRoot.sh appears, the pre-installation steps were not completed successfully. Typically, the /var/opt/oracle directory does not exist or is not writeable by oracle. Run /tmp/orainstRoot.sh to correct this, forcing Oracle Inventory files, and others, to be written to the ORACLE_HOME directory. Once again this screen only appears the first time Oracle9i products are installed on the system. Click Next .
- The File Location window will appear. Do NOT change the Source field. The Destination field defaults to the ORACLE_HOME environment variable. Click Next .
- Select the Products to install. In this example, select the Oracle9i Server then click Next .
- Select the installation type. Choose the Enterprise Edition option. The selection on this screen refers to the installation operation, not the database configuration. The next screen allows for a customized database configuration to be chosen. Click Next .
- Select the configuration type. In this example you choose the Advanced Configuration as this option provides a database that you can customize, and configures the selected server products. Select Customized and click Next .
- Select the other nodes on to which the Oracle RDBMS software will be installed. It is not necessary to select the node on which the OUI is currently running. Click Next .
- NOTE: If choosing to create a shared Oracle Home on GPFS, you will only choose one node within the Cluster Node Selection screen of OUI for the installation of the binaries.
- Identify the raw partition in to which the Oracle9i Real Application Clusters (RAC) configuration information will be written. It is recommended that this raw partition is a minimum of 100MB in size.
- An option to Upgrade or Migrate an existing database is presented. Do NOT select the radio button. The Oracle Migration utility is not able to upgrade a RAC database, and will error if selected to do so.
- The Summary screen will be presented. Confirm that the RAC database software will be installed and then click Install . The OUI will install the Oracle9i software on to the local node, and then copy this information to the other nodes selected.
- Once Install is selected, the OUI will install the Oracle RAC software on to the local node, and then copy software to the other nodes selected earlier. This will take some time. During the installation process, the OUI does not display messages indicating that components are being installed on other nodes - I/O activity may be the only indication that the process is continuing.
3.3 Create a RAC Database using the Oracle Database Configuration Assistant
The Oracle Database Configuration Assistant (DBCA) will create a database for you (for an example of manual database creation see Database Creation in Oracle9i RAC ). The DBCA creates your database using the optimal flexible architecture (OFA). This means the DBCA creates your database files, including the default server parameter file, using standard file naming and file placement practices. The primary phases of DBCA processing are:-
- Verify that you correctly configured the shared disks for each tablespace (for non-cluster file system platforms)
- Create the database
- Configure the Oracle network services
- Start the database instances and listeners
Oracle Corporation recommends that you use the DBCA to create your database. This is because the DBCA preconfigured databases optimize your environment to take advantage of Oracle9i features such as the server parameter file and automatic undo management. The DBCA also enables you to
define arbitrary tablespaces as part of the database creation process. So even if you have datafile requirements that differ from those offered in one of the DBCA templates, use the DBCA. You can also execute user-specified scripts as part of the database creation process.
The DBCA and the Oracle Net Configuration Assistant also accurately configure your Real Application Clusters environment for various Oracle high availability features and cluster administration tools.
- DBCA will launch as part of the installation process, but can be run manually by executing the command dbca from the $ORACLE_HOME/bin directory on UNIX platforms. The RAC Welcome Page displays. Choose Oracle Cluster Database option and select Next .
- The Operations page is displayed. Choose the option Create a Database and click Next .
- The Node Selection page appears. Select the nodes that you want to configure as part of the RAC database and click Next . If nodes are missing from the Node Selection then perform clusterware diagnostics by executing the $ORACLE_HOME/bin/lsnodes -v command and analyzing its output. Refer to your vendor's clusterware documentation if the output indicates that your clusterware is not properly installed. Resolve the problem and then restart the DBCA.
- The Database Templates page is displayed. The templates other than New Database include datafiles. Choose New Database and then click Next .
- The Show Details button provides information on the database template selected.
- DBCA now displays the Database Identification page. Enter the Global Database Name and Oracle System Identifier (SID) . The Global Database Name is typically of the form name.domain, for example mydb.us.oracle.com while the SID is used to uniquely identify an instance (DBCA should insert a suggested SID, equivalent to name1 where name was entered in the Database Name field). In the RAC case the SID specified will be used as a prefix for the instance number. For example, MYDB , would become MYDB1, MYDB2 for instance 1 and 2 respectively.
- The Database Options page is displayed. Select the options you wish to configure and then choose Next . Note : If you did not choose New Database from the Database Template page, you will not see this screen.
- The Additional database Configurations button displays additional database features. Make sure both are checked and click OK .
- Select the connection options desired from the Database Connection Options page. Note : If you did not choose New Database from the Database Template page, you will not see this screen. Click Next .
- DBCA now displays the Initialization Parameters page. This page comprises a number of Tab fields. Modify the Memory settings if desired and then select the File Locations tab to update information on the Initialization Parameters filename and location. Then click Next .
- The option Create persistent initialization parameter file is selected by default. If you have a cluster file system, then enter a file system name , otherwise a raw device name for the location of the server parameter file (spfile) must be entered. Then click Next .
- The button File Location Variables … displays variable information. Click OK .
- The button All Initialization Parameters … displays the Initialization Parameters dialog box. This box presents values for all initialization parameters and indicates whether they are to be included in the spfile to be created through the check box, included (Y/N). Instance specific parameters have an instance value in the instance column. Complete entries in the All Initialization Parameters page and select Close . Note : There are a few exceptions to what can be altered via this screen. Ensure all entries in the Initialization Parameters page are complete and select Next .
- DBCA now displays the Database Storage Window. This page allows you to enter file names for each tablespace in your database.
- The file names are displayed in the Datafiles folder, but are entered by selecting the Tablespaces icon, and then selecting the tablespace object from the expanded tree. Any names displayed here can be changed. A configuration file can be used, see section 3.2.1 , (pointed to by the environment variable DBCA_RAW_CONFIG ) . Complete the database storage information and click Next .
- The Database Creation Options page is displayed. Ensure that the option Create Database is checked and click Finish .
- The DBCA Summary window is displayed. Review this information and then click OK .
- Once the Summary screen is closed using the OK option, DBCA begins to create the database according to the values specified.
A new database now exists. It can be accessed via Oracle SQL*PLUS or other applications designed to work with an Oracle RAC database.
限于篇幅少了怎么管理instance的startup 和shutdown
- Note: 182037.1 - AIX: Quick Start Guide - 9.0.1 RDBMS Installation
- Note: 201019.1 - AIX: Quick Start Guide - 9.2.0 RDBMS Installation
- Note:137288.1 - Database Creation in Oracle9i RAC
- Note:183408.1 - Raw Devices and Cluster Filesystems With Real Application Clusters
- RAC/IBM AIX certification matrix
- Oracle9i Real Application Clusters Installation and Configuration Release 1 (9.0.1)
- Oracle9i Real Application Clusters Concepts
- Oracle9i Real Application Clusters Administration
- Oracle9i Real Application Clusters Deployment and Performance
- Oracle9i Installation Guide for Compaq Tru64, Hewlett-Packard HPUX, IBM-AIX, Linux, and Sun Solaris-based systems.
- Oracle9i Release Notes
全文完