DBA Tips Archive for Oracle |
Install Oracle Database 11g R2 on Linux using Oracle ASM - (OL5)
by Jeff Hunter, Sr. Database Administrator
This article is a comprehensive guide for installing Oracle Database 11g Release 2 (11.2) on the Oracle Linux 5 (OL5) operating environment using Oracle Automatic Storage Management (Oracle ASM) and Oracle Restart. Oracle ASM provides a virtualization layer between the database and storage so that multiple disks can be treated as a single disk group and disks can be dynamically added or removed while keeping databases online. The example database created in this guide will use Oracle ASM for all physical database file storage (data files, control files, online redo log files, Fast Recovery Area).
Oracle Automatic Storage Management (Oracle ASM) is a volume manager and a file system for Oracle database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations. Oracle ASM simplifies database administration by eliminating the need for the DBA to directly manage potentially thousands of Oracle database files requiring only the management of groups of disks allocated to the Oracle Database. Oracle ASM also supports a general purpose file system for application needs including Oracle Database binaries; however, storing the Oracle software in Oracle ASM will not be covered in this guide. Oracle ASM is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.
Oracle ASM is built into the Oracle kernel. All of the files and directories to be used for Oracle will be contained in an Oracle ASM disk group. Oracle ASM automatically performs load balancing in parallel across all available disk drives to prevent hot spots and maximize performance, even with rapidly changing data usage patterns.
In previous releases, Oracle ASM was installed as part of the Oracle Database installation. With Oracle Database 11g Release 2, Oracle ASM is part of an Oracle Grid Infrastructure installation, either for a cluster, or for a standalone server. This guide demonstrates how to create a single instance (non-RAC) database using Oracle ASM and therefore will require Oracle Database 11g Release 2 Grid Infrastructure for a Standalone Server to be installed before the Oracle Database software. Using the latest Optimal Flexible Architecture (OFA), Oracle Grid Infrastructure for a Standalone Server would be installed as the Oracle software owner (oracle) and the Oracle home directory would be /u01/app/oracle/product/11.2.0/grid.
Best practice is to install Oracle Grid Infrastructure for a Standalone Server before installing the database. The registration of the database with Oracle Restart is automatic when it is created after Grid Infrastructure is installed. In the case where the database is configured first and Grid later, the components would need to be manually added to the Oracle Restart configuration.
In this guide, Oracle ASM will be used as the file system and volume manager for Oracle Database files (data, online redo logs, control files, archived redo logs) and the Fast Recovery Area using two separate disk groups; namely +TESTDB1_DATA and +FRA respectively.
An optional support library for the Oracle ASM feature named ASMLib will be configured to create two Oracle ASM volumes. Although optional, ASMLib is highly recommended as it allows a database using Oracle ASM more efficient and capable access to the disk groups it is using. ASMLib was provided to enable Oracle ASM I/O to Linux disks without the limitations of the standard UNIX I/O API
Oracle Restart is another component of Oracle Grid Infrastructure for a Standalone Server that will be used in this guide.
Starting with Oracle Database 11g Release 2, the dbstart and dbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated. Oracle now recommends to configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, Oracle Automatic Storage Management (Oracle ASM), and other Oracle components after a hardware or software failure or when the database host computer restarts.
Oracle Restart can only manage 11.2 resources. Oracle Database releases prior to 11.2, however, can coexist on the same server but without being managed by Oracle Restart.
Oracle Restart improves the availability of an Oracle database by providing the following:
When there is a hardware or a software failure, Oracle Restart automatically starts all Oracle components, including the Oracle database instance, Oracle Net Listener, database services, and Oracle ASM.
Oracle Restart starts components in the proper order when the database host is restarted.
Oracle Restart runs periodic checks to monitor the status of Oracle components. If a check operation fails for a component, then the component is shut down and restarted.
When using Oracle Restart, you can use Service Control Utility (SRVCTL), a command-line interface, to manage Oracle processes (database instance, listener, ASM instance). With SRVCTL, you can manage the Oracle Restart configuration, see the status of processes managed by Oracle Restart, and start or stop processes such as the Oracle Database. SRVCTL has been enhanced to support single instance databases with Oracle Restart on standalone servers and on clusters with Oracle Clusterware.
Oracle Restart is used in single-instance (non-clustered) environments only.
It is a requirement that Oracle Grid Infrastructure for a Standalone Server and the Oracle Database software be installed in a separate Oracle home.
A separate Oracle home environment for Grid Infrastructure and the Oracle Database software will be created as described in the Oracle Configuration section to this guide.
Both 32-bit (x86) and 64-bit (x86_64) architectures are covered in this guide. Unless otherwise noted, the installation steps are the same for either. Having said that, one of the first decisions to make before continuing with this guide is which architecture you will be using. Both Oracle and Linux must be installed on the same operating system architecture. For example, 32-bit Oracle is only supported to run on 32-bit Linux OS and 64-bit Oracle is only supported to run on 64-bit Linux OS.
While this guide provides detailed instructions for successfully installing a complete Oracle Database 11g Release 2 system using Oracle ASM, it is by no means a substitute for the official Oracle documentation (see list below). In addition to this guide, users should also consult the following Oracle documents to gain a full understanding of alternative configuration options, installation, and administration with Oracle Database, Oracle Grid Infrastructure, Oracle ASM, and Oracle Restart. Oracle's official documentation site is docs.oracle.com.
Release Notes 11g Release 2 (11.2) for Linux New Features Guide 11g Release 2 (11.2) Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX Oracle Restart / Grid Infrastructure 11g Release 2 (11.2) for Linux Database Installation Guide 11g Release 2 (11.2) for Linux Database Quick Installation Guide 11g Release 2 (11.2) for Linux x86 Database Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64 Database Administrator's Guide 11g Release 2 (11.2) Database Concepts 11g Release 2 (11.2) Automatic Storage Management Administrator's Guide 11g Release 2 (11.2) Database Examples Installation Guide 11g Release 2 (11.2)
By the time you finish this article, the following will be installed and configured.
Two unformatted hard disks that will be marked as Oracle ASM disks using ASMLib. These two disks will be used to create two separate Oracle ASM disk groups for the database files and the recovery files (Fast Recovery Area).
Oracle Database 11g Release 2 Grid Infrastructure (11.2) for a Standalone Server on a local file system (namely /u01/app/oracle/product/11.2.0/grid) separate from the Oracle Database software. As part of the Oracle Grid Infrastructure installation, the Create ASM Disk Group wizard will be used to create an Oracle ASM instance named +ASM and an Oracle ASM disk group named +TESTDB1_DATA for the Oracle database files.
A default Oracle Net Listener created by the Grid Infrastructure installation and running out of the Oracle home directory for Grid Infrastructure. This listener will be used by the Oracle ASM instance and the example database created in this guide.
A separate Oracle ASM disk group for the Fast Recovery Area named +FRA and created using the Oracle Automatic Storage Management Configuration Assistant (Oracle ASMCA).
Oracle Database 11g Release 2 (11.2) software installed on a local file system (namely /u01/app/oracle/product/11.2.0/dbhome_1).
Oracle Database 11g Examples (formerly Companion).
An Oracle Restart enabled general-purpose database that makes use of Oracle ASM for physical database file storage (database files and the Fast Recovery Area).
Optional instructions are included to put the new database into Archive Log Mode.
Oracle Enterprise Manager Database Control running and can be accessed using a Web browser.
The following is a list of items NOT covered in this article:
Installing the Oracle Database software on a system that has an existing Oracle software installation. The installation in this article describes installing Oracle Database 11g Release 2 Grid Infrastructure (11.2) for a Standalone Server and Oracle Database 11g Release 2 (11.2) software on a system with no previous Oracle installation.
Installing Oracle Grid Infrastructure for a Cluster and Oracle Real Application Clusters (RAC). For a complete discussion on installing Oracle RAC 11g Release 2 (11.2) and creating a clustered database, see my article Building an Inexpensive Oracle RAC 11g R2 on Linux - (RHEL 5.5).
Enabling Enterprise Manager e-mail notifications or automated backups.
This section describes the hardware and Oracle configuration parameters that will be used in this guide.
The machine used for this guide will consist of an AMD Athlon™ 64 X2 Dual Core Processor 3800+ running Oracle Linux 5 (x86_64). The server has 4GB of memory and contains four (4) internal hard disks. Two of the hard disks will be configured using Logical Volume Manager (LVM) while the two remaining disks will remain unformatted. One logical volume will be created for the Linux O/S while a second logical volume will be created for the Oracle software (Oracle home directory for Grid Infrastructure and the Oracle Database software). The two unformatted hard disks will be marked as Oracle ASM disks and used for database files and the Fast Recovery Area.
| Machine Name | IP Address | Processor | Operation Environment | Memory |
|---|---|---|---|---|
| testnode1.idevelopment.info | 192.168.1.106 | 1 x AMD Athlon™ 64 X2 Dual Core Processor 3800+ | Oracle Linux 5.6 - (64-bit) | 4GB |
| Hard Drive | Partition | Size - (MB) | Type | Usage | Mount Point |
|---|---|---|---|---|---|
/dev/sda |
/dev/sda1 | 101 | ext3 | Boot Volume | /boot |
| /dev/sda2 | 36,758 | LVM Physical Volume | LVM | VolGroup00 |
|
/dev/sdb |
/dev/sdb1 | 36,860 | LVM Physical Volume | LVM | vg_orasoftware |
/dev/sdc |
/dev/sdc1 | 36,860 | Unformatted | Oracle ASM Disk | |
/dev/sdd |
/dev/sdd1 | 36,860 | Unformatted | Oracle ASM Disk |
| LVM Volume Group | Logical Volume | Size - (MB) | Type | Usage | Mount Point |
|---|---|---|---|---|---|
VolGroup00 |
LogVol00 | 31,712 | ext3 | Linux OS | / |
| LogVol01 | 5,024 | swap | Swap | ||
vg_orasoftware |
lv_orasoftware | 36,832 | ext3 | Oracle Database Software | /u01 |
| ASM Disk Name | Device | Size - (MB) | Type | Usage | ASM Disk Group | ASM Redundancy |
|---|---|---|---|---|---|---|
DATAVOL1 |
/dev/sdc1 | 32,768 | ASMLib | Database Files | +TESTDB1_DATA | External |
FRAVOL1 |
/dev/sdd1 | 32,768 | ASMLib | Fast Recovery Area | +FRA | External |
The following is an introduction to some of the configuration parameters that will be used for installing the Oracle Grid Infrastructure and Oracle Database Software and creating a fully functional Oracle 11g database configured to use Oracle ASM.
| O/S User | Primary Group | Supplementary Groups | Home Directory |
|---|---|---|---|
| oracle (501) | oinstall (501) | dba (502), oper (503), asmadmin (504), asmdba (505), asmoper (506) | /home/oracle |
| Software Component | Version |
|---|---|
| Grid Infrastructure for a Standalone Server | Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86-64 |
| Oracle Database | Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86-64 |
| Software Component | Oracle SID | Global Database Name |
|---|---|---|
| Grid Infrastructure for a Standalone Server | +ASM | N/A |
| Oracle Database | testdb1 | testdb1.idevelopment.info |
| Description | Directory |
|---|---|
| Oracle Base directory | /u01/app/oracle |
| Oracle Home directory for Oracle Grid Infrastructure | /u01/app/oracle/product/11.2.0/grid |
| Oracle Home directory for Oracle Database | /u01/app/oracle/product/11.2.0/dbhome_1 |
This guide adheres to the latest Optimal Flexible Architecture (OFA) standard for Oracle Database 11g Release 2 (11.2) for Linux.
This section provides a summary of the steps used to install the Linux operating system. This guide is designed to work with Oracle Linux 5, CentOS 5, or Red Hat Enterprise Linux 5 and follows Oracle's suggestion of performing a "default RPMs" installation type to ensure all expected Linux O/S packages are present for a successful Oracle Database installation.
Download Oracle Linux 5 from the Oracle Software Delivery Cloud (eDelivery) website.
Download the compressed binary DVD image V24479-01.zip for Oracle Linux Release 5 Update 6 (x86_64). Once downloaded, extract the binary DVD image from the archive which for this example is named Enterprise-R5-U6-Server-x86_64-dvd.iso.
Download the compressed binary DVD image V24478-01.zip for Oracle Linux Release 5 Update 6 (x86). Once downloaded, extract the binary DVD image from the archive which for this example is named Enterprise-R5-U6-Server-i386-dvd.iso.
If you are downloading the above ISO files to a MS Windows machine, there are many options for burning these images (ISO files) to a DVD. You may already be familiar with and have the proper software to burn images to DVD. If you are not familiar with this process and do not have the required software to burn images to DVD, here are just three of the many software packages that can be used.
After downloading and burning the Oracle Linux image (ISO file) to a DVD, insert Disk #1 into the server, power it on, and answer the installation screen prompts as noted below.
| Screen Name | Response | Screen Shot | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Boot Screen | The first screen is the Oracle Linux boot screen. At the boot: prompt, hit [Enter] to start the installation process. | ![]() |
||||||||||||
| Media Test | When asked to test the CD media, tab over to [Skip] and hit [Enter]. If there were any errors, the media burning software would have warned us. After several seconds, the installer should then detect the video card, monitor, and mouse. The installer then goes into GUI mode. | ![]() |
||||||||||||
| Welcome to Oracle Linux | At the welcome screen, click [Next] to continue. | ![]() |
||||||||||||
| Language Selection | Select the appropriate language for your configuration and click [Next] to continue. | ![]() |
||||||||||||
| Keyboard Selection | Select the appropriate keyboard for your configuration and click [Next] to continue. | ![]() |
||||||||||||
| Storage Device Warning | The installer will display a warning dialog for every installed disk device it detects indicating that the storage device may contain important data and that the device must be initialized in order to create new partitions. Click [Yes] to acknowledge this warning for each disk device the installer detects. | |||||||||||||
| Select System Drive(s) |
Select "Remove all partitions on selected drives and create default layout".
If the machine is configured with multiple storage devices, select which device (or devices) to include as the system drive(s). Any selected devices will be used as system drives and will be formatted by the installer and included as the target for the OS install. In this guide, only one of the devices will be used for the system drive (sda). Finally, check the option to "Review and modify partitioning layout" and click [Next] to continue. You will then be prompted with a dialog window asking if you really want to remove all partitions (ALL_DATA) on the selected drives. Click [Yes] to acknowledge this warning. |
|||||||||||||
| Disk Partitioning Layout |
The installer will present a default partitioning scheme for the
current disk sizes. Modify any volumes as required. The settings you
make here will, of course, depend on your storage configuration.
Given the example presented in this guide, I only configured two of the four hard disks using the Disk Partitioning Layout wizard.
Click here for a preview of the disk configuration used for this guide. Ensure enough swap space is allocated as required by Oracle (which is a multiple of the available RAM). The following is Oracle's minimum requirement for swap space:
Once you are satisfied with the disk layout, click [Next] to continue. |
![]() |
||||||||||||
| Boot Loader Configuration | The installer will use the GRUB boot loader by default. To use the "GRUB boot loader", accept all default values and click [Next] to continue. | ![]() |
||||||||||||
| Network Configuration |
The installer should have successfully detected any installed network devices.
It is not recommended to configure the public interface on an Oracle Database
server (eth0 in this example) to use DHCP so this guide will use the
traditional method of manually assigning a static IP address. The settings you
make here will, of course, depend on your network configuration.
First, make sure that the public network device is checked to "Active on boot". Second, [Edit] the public network interface (eth0) accordingly.
Continue by manually setting the hostname and supplying your gateway and DNS servers. Click [Next] to continue |
|||||||||||||
| Time Zone | Select the appropriate time zone for your environment and click [Next] to continue. | ![]() |
||||||||||||
| Set Root Password | Select a root password and click [Next] to continue. | ![]() |
||||||||||||
| Installation Type |
By default, Oracle Linux installs most of the software required
for a typical server. There are several other packages (RPMs), however, that
are required to successfully install the Oracle software.
The installer includes a "Customize software" selection that allows the
addition of RPM groupings such as "Development Libraries" or
"Legacy Library Support". The addition of such RPM groupings is not an issue.
De-selecting any "default RPM" groupings or individual RPMs, however, can
result in failed Oracle Grid Infrastructure and Oracle Database installation attempts.
For the purpose of this guide, select the radio button "Customize now" and click [Next] to continue. |
![]() |
||||||||||||
| Package Group Selection |
This is where you pick the packages to install. Most of the packages required
for the Oracle software are grouped into "Package Groups" (i.e. Application -> Editors).
Since this machine will be hosting the Oracle Grid Infrastructure and Oracle Database software,
verify that at least the following package groups are selected for the install. For many of the
Linux package groups, not all of the packages associated with that group get selected
for installation. (Note the "Optional packages" button after selecting a package group.)
So although the package group gets selected for install, some of
the packages required by Oracle do not get installed. In fact, there are some packages
that are required by Oracle that do not belong to any of the available package groups
(i.e. libaio-devel).
Not to worry. A complete list of required packages for Oracle Grid Infrastructure 11g Release 2
and Oracle Database 11g Release 2 for Linux will be provided
in the next section.
These packages will need to be manually installed from the Oracle Linux DVDs
after the operating system install. For now, install the following package groups.
In addition to the above packages, select any additional packages you wish to install for this node keeping in mind to NOT de-select any of the "default" RPM packages. After selecting the packages to install click [Next] to continue. |
![]() |
||||||||||||
| About to Install | This screen is basically a confirmation screen. Click [Next] to start the installation. If you are installing Oracle Linux using CDs, you will be asked to switch CDs during the installation process depending on which packages you selected. | ![]() |
||||||||||||
| Installation Process | The Oracle Linux install process will start. Wait for the installation to complete. | ![]() |
||||||||||||
| Reboot System | After all of the packages and bootloader have been installed, the installer will eject the DVD from the drive. Take out the DVD and click [Reboot] to reboot the system and complete the installation. | ![]() |
||||||||||||
| Post Installation Wizard Welcome Screen |
When the system boots into Oracle Linux for the first time, it will prompt you with another welcome screen for the "Post Installation Wizard". The post installation wizard allows you to make final OS configuration settings. On the "Welcome screen", click [Forward] to continue. | ![]() |
||||||||||||
| License Agreement | Accept the license agreement and click [Forward] to continue. | ![]() |
||||||||||||
| Firewall |
On the Firewall screen, make sure to select the "Disabled" option and
click [Forward] to continue.
You will be prompted with a warning dialog about not setting the firewall. When this occurs, click [Yes] to continue. |
![]() |
||||||||||||
| SELinux |
On the SELinux screen, choose the "Disabled" option and click
[Forward] to continue.
You will be prompted with a warning dialog warning that changing the SELinux setting will require rebooting the system so the entire file system can be relabeled. When this occurs, click [Yes] to acknowledge a reboot of the system will occur after firstboot (Post Installation Wizard) is completed. |
![]() |
||||||||||||
| Kdump | Accept the default setting on the Kdump screen and click [Forward] to continue. | ![]() |
||||||||||||
| Date and Time | Adjust the date and time settings if necessary and click [Forward] to continue. | ![]() |
||||||||||||
| Create User |
Create any additional (non-oracle) operating system user accounts if desired and click [Forward] to
continue.
If you chose not to define any additional operating system user accounts, click [Yes] to acknowledge the warning dialog. |
![]() |
||||||||||||
| Sound Card | On the sound card screen, click [Forward] to continue. | ![]() |
||||||||||||
| Additional CDs | On the "Additional CDs" screen click [Finish] to continue. | ![]() |
||||||||||||
| Reboot System | Enabling Kdump requires the machine to be rebooted in order to reallocate memory accordingly. Click [Yes] on the warning dialog to reboot the system. | ![]() |
||||||||||||
| Login Screen | After the machine boots, you are presented with the Oracle Linux login screen. | ![]() |
||||||||||||
| User Desktop | After successfully logging in to the system, you are ready to start using the desktop. | ![]() |
||||||||||||
After installing the Linux OS, the next step is to verify and install all packages required for Oracle Grid Infrastructure and Oracle Database. The Oracle Universal Installer (OUI) performs checks on the machine during installation to verify that it meets the appropriate operating system package requirements. To ensure that these checks complete successfully, verify the software requirements documented in this section before starting the Oracle install.
Although many of the required packages for Oracle were installed during the Linux installation, several will be missing either because they were considered optional within the package group or simply didn't exist in any package group.
The packages listed in this section (or later versions) are required for Oracle Grid Infrastructure 11g Release 2 and Oracle Database 11g Release 2 running on the Red Hat Enterprise Linux 5, Oracle Linux 5, or CentOS 5 platform.
While it is possible to query each individual package to determine which ones are missing and need to be installed, an easier method is to run the rpm -Uvh PackageName command from the DVD. For packages that already exist and are up to date, the RPM command will simply ignore the install and print a warning message to the console that the package is already installed.
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit) elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit) glibc-common-2.5 glibc-devel-2.5 glibc-devel-2.5 (32 bit) glibc-headers-2.5 ksh-20060214 libaio-0.3.106 libaio-0.3.106 (32 bit) libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit) libgcc-4.1.2 libgcc-4.1.2 (32 bit) libstdc++-4.1.2 libstdc++-4.1.2 (32 bit) libstdc++-devel 4.1.2 libstdc++-devel 4.1.2 (32 bit) make-3.81 pdksh-5.2.14 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-2.2.11 (32 bit) unixODBC-devel-2.2.11 unixODBC-devel-2.2.11 (32 bit)
Each of the packages listed above can be found on the Oracle Linux 5 for x86_64 DVDs.
|
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.52 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81 pdksh-5.2.14 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-devel-2.2.11
Each of the packages listed above can be found on the Oracle Linux 5 for x86 DVDs.
|
This section provides instructions on how to create the operating system user and groups that will be used to install and manage the Oracle Grid Infrastructure and Oracle Database software. In addition to the Oracle software owner, another OS user (jhunter) will be configured with the appropriate DBA related OS groups to manage the Oracle database and Oracle ASM instance for Grid Infrastructure.
The following OS groups will be created.
| Description | OS Group Name | OS Group ID | OS Users Assigned to this Group | Oracle Privilege | Oracle Group Name |
|---|---|---|---|---|---|
| Oracle Inventory and Software Owner | oinstall | 501 | oracle | ||
| Database Administrator | dba | 502 | oracle, jhunter | SYSDBA | OSDBA |
| Database Operator | oper | 503 | oracle, jhunter | SYSOPER | OSOPER |
| Oracle Automatic Storage Management Group | asmadmin | 504 | oracle | SYSASM | OSASM |
| ASM Database Administrator Group | asmdba | 505 | oracle, jhunter | SYSDBA for ASM | OSDBA for ASM |
| ASM Operator Group | asmoper | 506 | oracle, jhunter | SYSOPER for ASM | OSOPER for ASM |
Oracle Inventory Group (typically oinstall)
This group must be created the first time you install Oracle software on the system. Members of the OINSTALL group are considered the "owners" of the Oracle software and are granted privileges to write to the Oracle central inventory (oraInventory). When you install Oracle software on a Linux system for the first time, OUI creates the /etc/oraInst.loc file. This file identifies the name of the Oracle Inventory group (by default, oinstall), and the path of the Oracle Central Inventory directory.
Ensure that this group is available as a primary group for all planned Oracle software installation owners. For the purpose of this guide, the oracle installation owner will be configured with oinstall as its primary group.
Database Administrator (OSDBA, typically dba)
Members of the OSDBA group can use SQL to connect to an Oracle instance as SYSDBA using operating system authentication. Members of this group can perform critical database administration tasks, such as creating the database and instance startup and shutdown. The default name for this group is dba. The SYSDBA system privilege allows access to a database instance even when the database is not open. Control of this privilege is totally outside of the database itself.
The oracle installation owner should be a member of the OSDBA group (configured as a secondary group) along with any other DBA user accounts (i.e. jhunter) needing access to an Oracle instance as SYSDBA using operating system authentication.
The SYSDBA system privilege should not be confused with the database role DBA. The DBA role does not include the SYSDBA or SYSOPER system privileges.
Database Operator (OSOPER, typically oper)
Members of the OSOPER group can use SQL to connect to an Oracle instance as SYSOPER using operating system authentication. Members of this optional group have a limited set of database administrative privileges such as managing and running backups. The default name for this group is oper. The SYSOPER system privilege allows access to a database instance even when the database is not open. Control of this privilege is totally outside of the database itself. To use this group, choose the Advanced installation type to install the Oracle database software.
The Oracle Automatic Storage Management Group (typically asmadmin)
Create this group as a separate group if you want to have separate administration privilege groups for Oracle ASM and Oracle Database administrators. In Oracle documentation, the operating system group whose members are granted privileges is called the OSASM group, and in code examples, where there is a group specifically created to grant this privilege, it is referred to as asmadmin.
Members of the OSASM group can use SQL to connect to an Oracle ASM instance as SYSASM using operating system authentication. The SYSASM privilege that was introduced in Oracle ASM 11g Release 1 (11.1) is now fully separated from the SYSDBA privilege in Oracle ASM 11g Release 2 (11.2). SYSASM privileges no longer provide access privileges on an RDBMS instance. Providing system privileges for the storage tier using the SYSASM privilege instead of the SYSDBA privilege provides a clearer division of responsibility between ASM administration and database administration, and helps to prevent different databases using the same storage from accidentally overwriting each others files. The SYSASM privileges permit mounting and dismounting disk groups, and other storage administration tasks.
The ASM Database Administrator group (OSDBA for ASM, typically asmdba)
Members of the ASM Database Administrator group (OSDBA for ASM) is a subset of the SYSASM privileges and are granted read and write access to files managed by Oracle ASM. When using ASM, all Oracle Database software owners (i.e. oracle) must be a member of this group, and all users with OSDBA membership on databases that have access to the files managed by Oracle ASM must be members of the OSDBA group for ASM.
Members of the ASM Operator Group (OSOPER for ASM, typically asmoper)
This is an optional group. Create this group if you want a separate group of operating system users to have a limited set of Oracle ASM instance administrative privileges (the SYSOPER for ASM privilege), including starting up and stopping the Oracle ASM instance. By default, members of the OSASM group also have all privileges granted by the SYSOPER for ASM privilege.
To use the ASM Operator group to create an ASM administrator group with fewer privileges than the default asmadmin group, you must choose the Advanced installation type to install the Oracle Database software. In this case, OUI prompts you to specify the name of this group. In this guide, this group is asmoper.
If you want to have an OSOPER for ASM group, then the Oracle software owner (oracle) must be a member of this group.
Create the recommended OS groups and user for the Oracle Database software owner.
|
Create a new password for the oracle account.
|
Optionally, configure any other OS users with the appropriate DBA related OS groups to manage the Oracle database and Oracle ASM instance for Grid Infrastructure. Remember to use the append option (-a) to the usermod command so that the user will not be removed from groups not listed.
|
Log in to machine as the oracle user account and create the following login script (.bash_profile). Values marked in red should be customized for your environment.
|
|
Before installing the software, complete the following procedure to verify that the user nobody exists on the system.
To determine if the user exists, enter the following command.
|
If this command displays information about the nobody user, then you do not have to create that user.
If the user nobody does not exist, then enter the following command to create it.
|
The next step is to configure an Oracle base path compliant with an Optimal Flexible Architecture (OFA) structure and correct permissions. The Oracle base path will be used to store the Oracle Database software.
|
At the end of this section, you should have the following user, groups, and directory path configuration.
An Oracle central inventory group, or oraInventory group (oinstall), whose members include oracle. Members of this group have the central inventory group as their primary group and are granted permissions to write to the oraInventory directory.
A separate OSDBA group (dba), whose members include oracle, and who are granted the SYSDBA privilege to administer the Oracle Database.
A separate OSOPER group (oper), whose members include oracle, and who are granted limited Oracle database administrator privileges.
A separate OSASM group (asmadmin), whose members include oracle, and who are granted the SYSASM privilege to administer Oracle Grid Infrastructure and Oracle ASM.
A separate OSDBA for ASM group (asmdba), whose members include oracle, and who are granted access to Oracle ASM.
A separate OSOPER for ASM group (asmoper), whose members include oracle, and who are granted limited Oracle ASM administrator privileges, including the permissions to start and stop the Oracle ASM instance.
An Oracle Database software owner (oracle), with the oraInventory group as its primary group, and with the OSDBA (dba), OSOPER (oper), OSASM (asmadmin), OSDBA for ASM (asmdba), and OSOPER for ASM (asmoper) group as its secondary group.
OFA-compliant mount point /u01 that will be used for the Oracle software installation.
During installation, OUI creates the Oracle Inventory directory in the path /u01/app/oraInventory. This path remains owned by oracle:oinstall, to enable other Oracle software owners to write to the central inventory.
An Oracle base /u01/app/oracle owned by oracle:oinstall with 775 permissions.
To improve the performance of the software on Linux systems, you must increase the following resource limits for the Oracle software owner (oracle).
| Resource Shell Limit | Item in limits.conf | Soft Limit | Hard Limit |
|---|---|---|---|
| Open file descriptors | nofile | at least 1024 | at least 65536 |
| Number of processes available to a single user | nproc | at least 2047 | at least 16384 |
| Size of the stack segment of the process | stack | at least 10240 KB | at least 10240 KB, and at most 32768 KB |
Use the following to check resource limits.
Log in as an Oracle installation owner.
Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range. For example:
|
Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range. For example:
|
Check the soft limit for the stack setting. Ensure that the result is in the recommended range. For example:
|
If necessary, update the resource limits in the /etc/security/limits.conf configuration file for the Oracle installation owner by adding the following lines.
|
Add the following line to the /etc/pam.d/login file, if it does not already exist.
|
Depending on your shell environment, make the following changes to the default shell startup file in order to change ulimit settings for the Oracle installation owner.
For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file.
|
For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file.
|
This section focuses on preparing the Linux operating system for the Oracle Grid Infrastructure 11g Release 2 and Oracle Database 11g Release 2 installation. This includes verifying enough memory and swap space, setting shared memory and semaphores, setting the maximum number of file handles, setting the IP local port range, and how to activate all kernel parameters for the system.
The kernel parameters discussed in this section will need to persist through machine reboots. Although there are several methods used to set these parameters, I will be making all changes permanent through reboots by placing all values in the /etc/sysctl.conf file. Instructions for setting all OS kernel parameters required by Oracle in a startup script will be discussed later in this section.
The kernel parameters presented in this section are only recommended values as documented by Oracle. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system.
Verify that the kernel parameters described in this section are set to values greater than or equal to the recommended values. Also note that when setting the four semaphore values that all four values need to be entered on one line.
Oracle Database 11g Release 2 for Linux requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, do not change it.
|
Add or amend the following lines in the /etc/sysctl.conf file.
|
Placing the kernel parameters in the /etc/sysctl.conf startup file persists the required kernel parameters through reboots. Linux allows modification of these kernel parameters to the current system while it is up and running, so there's no need to reboot the system after making kernel parameter changes. To activate the new kernel parameter values for the currently running system, run the following as root.
|
Verify the new kernel parameter values by running the following.
|
The minimum required RAM for Oracle Database 11g Release 2 running on the Linux platform is 1 GB (although 2 GB or more of RAM is highly recommended). In addition to the Oracle Database, Oracle Grid Infrastructure for a Standalone Server requires a minimum of 1.5 GB of RAM. Oracle recommends 4 GB or more when planning to install both Oracle Grid Infrastructure for a Standalone Server and Oracle Database on the same machine which is the configuration described in this guide.
Use the following command to check the amount of installed RAM on the system.
|
If the size of the installed RAM is less than the required size, then you must install more memory before continuing.
The following table describes the relationship between installed RAM and the configured swap space recommendation.
| Available RAM | Swap Space Required |
|---|---|
| Between 1 GB and 2 GB | 1.5 times the size of RAM |
| Between 2 GB and 16 GB | Equal to the size of RAM |
| More than 16 GB | 16 GB |
Use the following command to determine the size of the configured swap space.
|
If necessary, additional swap space can be configured by creating a temporary swap file and adding it to the current swap. This way you do not have to use a raw device or even more drastic, rebuild your system.
As root, make a file that will act as additional swap space, let's say about 500MB.
|
Next, change the file permissions.
|
Finally, format the "partition" as swap and add it to the swap space:
|
To determine the available RAM and swap space, enter the following command.
|
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm) and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
To determine the amount of shared memory available, enter the following command.
|
During the Linux OS install, we already configured the IP address and host name for the database node. This sections contains additional network configuration steps that will prepare the machine to run the Oracle database.
Note that the Oracle database server should have a static IP address configured for the public network (eth0 for this guide). Do not use DHCP naming for the public IP address; you need a static IP address.
Ensure that the node name (testnode1) is not included for the loopback address in the /etc/hosts file. If the machine name is listed in the in the loopback address entry as below:
|
it will need to be removed as shown below:
|
The /etc/hosts file must contain a fully qualified name for the server.
|
For example.
|
During the Linux OS install, I indicated to disable the firewall. By default the option to configure a firewall is selected by the installer. This has burned me several times so I like to do a double-check that the firewall option is not configured and to ensure udp ICMP filtering is turned off.
Check to ensure that the firewall option is turned off. If the firewall option is stopped (like it is in my example below) you do not have to proceed with the following steps.
|
If the firewall option is operating, you will need to first manually disable UDP ICMP rejections.
|
Then, turn UDP ICMP rejections off for all subsequent server reboots (which should always be turned off).
|
As mentioned in the hardware configuration section of this guide, two hard disks will be configured as Oracle ASM volumes to store the database files (/dev/sdc) and the Fast Recovery Area (/dev/sdd) which will be managed by Oracle ASM. During the Linux OS install, these two hard disks were not formatted using the Disk Partitioning Layout wizard. This section describes how these two hard disks can be partitioned and then configured as Oracle ASM disks using ASMLib 2.0 which is an optional support library for the Oracle ASM feature of the Oracle Database.
Before using a hard disk as a physical volume for Oracle ASM, decide whether the entire disk will be used (/dev/sdc) or a disk partition (/dev/sdc1). In this guide, two unformatted hard disks were earmarked to be Oracle ASM disks. Given that there is no information on these disks, it doesn't matter if you use the entire disk or whether to create a partition on each hard disk.
For the purpose of this guide, I decided to create a single partition on each hard disk.
|
ASMLib 2.0 is an optional support library for the Oracle ASM feature of the Oracle Database. In this guide, Oracle ASM will be used as the file system and volume manager for Oracle Database files (data, online redo logs, control files, archived redo logs) and the Fast Recovery Area. Although optional, installing and configuring ASMLib is highly recommended as it allows a database using Oracle ASM more efficient and capable access to the disk groups it is using. ASMLib was provided to enable Oracle ASM I/O to Linux disks without the limitations of the standard UNIX I/O API
Keep in mind that ASMLib is only a support library for the Oracle ASM software. The Oracle ASM software will be installed as part of Oracle Grid Infrastructure for a Standalone Server later in this guide.
So, is ASMLib required for Oracle ASM? Not at all. In fact, there are two different methods to configure Oracle ASM on Linux.
ASM with ASMLib I/O
This method creates all Oracle database files on raw block devices managed by Oracle ASM using ASMLib calls. RAW character devices are not required with this method as ASMLib works with block devices.
ASM with Standard Linux I/O
This method does not make use of ASMLib. Oracle database files are created on raw character devices managed by ASM using standard Linux I/O system calls. You will be required to create RAW devices for all disk partitions used by Oracle ASM.
This guide uses the "ASM with ASMLib I/O" method.
To learn more about Oracle ASMLib 2.0, visit http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html.
Download the latest ASMLib 2.0 libraries and the kernel driver from the Oracle Technology Network (OTN) website.
Oracle ASMLib Downloads for Red Hat Enterprise Linux Server 5
At the time of this writing, the latest release of the ASMLib kernel driver is 2.0.5-1.
Download the appropriate version of the ASMLib driver for the Linux kernel release and machine architecture.
|
The output above indicates Linux kernel release 2.6.18-238.el5 running on the x86_64 architecture.
Next, download the ASMLib tools.
Next, download the ASMLib tools.
Install ASMLib 2.0 as the root user account.
|
Verify the ASMLib packages were installed.
|
After installing the ASMLib packages for Linux, configure and load the ASM kernel module. This task needs to be run as the root user account.
The oracleasm command by default is in the path /usr/sbin. The /etc/init.d path, which was used in previous releases of ASMLib, is not deprecated but the oracleasm binary in that path is now used typically for internal commands. If you enter the command oracleasm configure without the -i flag, then you are shown the current configuration. For example,
|
Enter the following command to run the oracleasm initialization script with the configure option.
|
The script completes the following tasks.
Enter the following command to load the oracleasm kernel module:
|
In the previous subsection, two hard disks were partitioned to be used by Oracle ASM. Use oracleasm to label the hard disk partitions for discovery by ASM.
|
Validate that the ASM disks were successfully created by using oracleasm listdisks. This command identifies any disks attached to the node that are marked as Oracle ASM disks.
|
Perform one last check that the new Oracle ASM disks are mounted in the oracleasm file system.
|
Download and extract the required Oracle software packages from the Oracle Technology Network (OTN), Oracle Software Delivery Cloud (eDelivery), or My Oracle Support (MOS) website depending on your support status.
Oracle Grid Infrastructure and Oracle Database 11g Release 2 base release (11.2.0.1) is available through the Oracle Software Delivery Cloud (eDelivery) or OTN. If you do not currently have an account with Oracle OTN or eDelivery, you will need to create one. This is a free account. Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.
Oracle Grid Infrastructure and Oracle Database 11g Release 2 (11.2.0.2) and (11.2.0.3) are only available through My Oracle Support (MOS) and are listed as patch sets in this section.
Access to MOS requires an Oracle Single Sign On (SSO) account (which is the same account used for OTN) and a valid Customer Support Identifier (or CSI). MOS requires a paid software license and support contract and is the only place to download critical updates and patch sets. Starting with the release of the 11.2.0.2 patch set for Oracle Database 11g Release 2, Oracle Database patch sets are full installations of the Oracle Database software (you do not need to download and install 11.2.0.1 first).
Log in as the Oracle software owner (oracle) and download the Oracle Grid Infrastructure, Oracle Database, and Oracle Examples (optional) software to an install directory. For example /home/oracle/software/oracle.
| Oracle Software Component | Release | Location | Associated Zip File(s) |
|---|---|---|---|
| Oracle Database 11g Release 2 Grid Infrastructure | 11.2.0.1 | OTN / eDelivery / MOS | linux.x64_11gR2_grid.zip |
| Oracle Database 11g Release 2 | 11.2.0.1 | OTN / eDelivery / MOS | linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip |
| Oracle Database 11g Release 2 Examples | 11.2.0.1 | OTN / eDelivery / MOS | linux.x64_11gR2_examples.zip |
|
| Oracle Software Component | Release | MOS Patch Set | Associated Zip File(s) |
|---|---|---|---|
| Oracle Database 11g Release 2 Grid Infrastructure | 11.2.0.2 | 10098816 | p10098816_112020_Linux-x86-64_3of7.zip |
| Oracle Database 11g Release 2 | 11.2.0.2 | 10098816 | p10098816_112020_Linux-x86-64_1of7.zip p10098816_112020_Linux-x86-64_2of7.zip |
| Oracle Database 11g Release 2 Examples | 11.2.0.2 | 10098816 | p10098816_112020_Linux-x86-64_6of7.zip |
|
| Oracle Software Component | Release | MOS Patch Set | Associated Zip File(s) |
|---|---|---|---|
| Oracle Database 11g Release 2 Grid Infrastructure | 11.2.0.3 | 10404530 | p10404530_112030_Linux-x86-64_3of7.zip |
| Oracle Database 11g Release 2 | 11.2.0.3 | 10404530 | p10404530_112030_Linux-x86-64_1of7.zip p10404530_112030_Linux-x86-64_2of7.zip |
| Oracle Database 11g Release 2 Examples | 11.2.0.3 | 10404530 | p10404530_112030_Linux-x86-64_6of7.zip |
|
You should now have directories called grid, database, and the optional examples directory containing the Oracle installation files.
This subsection contains any remaining pre-installation tasks for Oracle Database 11g Release 2 Grid Infrastructure for a Standalone Server that have not already been discussed.
Oracle Universal Installer (OUI) detects when the minimum requirements for an installation are not met and creates shell scripts called fixup scripts to finish incomplete system configuration steps. If OUI detects an incomplete task, it then generates fixup scripts (runfixup.sh). You can run the fixup script after you click the [Fix and Check Again Button] during the Oracle Grid Infrastructure installation.
Oracle recommends to run the Cluster Verification Utility (CVU) script runcluvfy.sh before installing Oracle Grid Infrastructure for a Standalone Server to verify the environment for Oracle Restart. Note that manually running the CVU before running the Oracle installer is not required. If you decide that you want to run the CVU, keep in mind that it should be run as the oracle user with user equivalence configured for the oracle user. If user equivalence is not configured for the oracle user account, the CVU utility will fail before having the opportunity to perform any of its critical checks and generate the fixup scripts:
|
If you decide to run the CVU, configure user equivalence for the oracle user account and run runcluvfy.sh stage -pre hacfg to verify that the server meets the installation requirements for Oracle Restart.
|
Review the CVU report.
All pre-installation tasks have already been performed to successfully install and configure the Oracle Database 11g Release 2 software.
The Oracle Grid Infrastructure for a Standalone Server is the Oracle software that provides system support for an Oracle database including volume management, file system, and automatic restart capabilities. Whenever planning to use Oracle Restart or Oracle Automatic Storage Management (Oracle ASM), then you must install Oracle Grid Infrastructure for a Standalone Server before you install and create the database. Oracle Grid Infrastructure for a Standalone Server is the software that includes Oracle Restart and Oracle ASM. Oracle combines the two infrastructure products into a single set of binaries that is installed in the Oracle Grid Infrastructure home. The Oracle Grid Infrastructure home for this guide will be /u01/app/oracle/product/11.2.0/grid.
Log into the node as the Oracle software owner (oracle). If you are using X emulation then set the DISPLAY environmental variable accordingly.
|
Before starting the OUI, make certain to either unset $TNS_ADMIN or set it appropriately for the Grid Infrastructure home environment (/u01/app/oracle/product/11.2.0/grid/network/admin).
Start the Oracle Universal Installer (OUI) by issuing the following command in the grid install directory.
|
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
| Screen Name | Response | Screen Shot | ||||||
|---|---|---|---|---|---|---|---|---|
| Installation Option | Select "Install and Configure Grid Infrastructure for a Standalone Server". | ![]() |
||||||
| Product Languages | Make the appropriate selection(s) for your environment. | ![]() |
||||||
| Create ASM Disk Group |
The Create ASM Disk Group screen lists all of
the Oracle ASM candidate disks that were
labeled during the
ASMLib configuration.
Note that the Create ASM Disk Group wizard only allows for the configuration of one disk group. Using this wizard, create an Oracle ASM disk group that will be used for database files. A second Oracle ASM disk group will be created for the recovery files (Fast Recovery Area) later in this guide using the Oracle Automatic Storage Management Configuration Assistant (Oracle ASMCA). Create an ASM Disk Group that will be used to store the database files for the example database described in this guide according to the values in the table below. If the Oracle ASM disks do not show up in the "Select Member Disks" window as eligible (ORCL:DATAVOL1 and ORCL:FRAVOL1) then click on the [Change Disk Discovery Path] button and input "ORCL:*".
During installation, disk paths mounted on Oracle ASM and registered on ASMLIB with the string ORCL:* are listed as default database storage candidate disks. |
![]() |
||||||
| Specify ASM Password | Enter the SYSASM password required to connect to the
Oracle ASM instance. The Oracle ASM instance is managed by a
privileged role called SYSASM, which grants full access
to Oracle ASM disk groups. Oracle recommends that you create a less
privileged user, ASMSNMP, with SYSDBA privileges
to monitor the Oracle ASM instance.
Enter passwords for the SYS and ASMSNMP database accounts. The passwords should be at least eight characters in length and include at least one alphabetic and one numeric character. To specify the same password for both accounts, select "Use same passwords for these accounts". |
![]() |
||||||
| Privileged Operating System Groups | This guide makes use of role-based administrative privileges
and high granularity in specifying
Automatic Storage Management roles.
Make any changes necessary to match the values in the table below.
|
![]() |
||||||
| Specify Installation Location | Set the "Oracle Base" ($ORACLE_BASE) and
"Software Location" ($ORACLE_HOME)
for the Oracle Grid Infrastructure for a Standalone Server installation.
Oracle Base: /u01/app/oracle Software Location: /u01/app/oracle/product/11.2.0/grid |
![]() |
||||||
| Create Inventory | Since this is the first install on the host, you will need to
create the Oracle Inventory. Use the default values provided by the OUI.
Inventory Directory: /u01/app/oraInventory oraInventory Group Name: oinstall |
![]() |
||||||
| Prerequisite Checks | The installer will run through a series of checks to determine
if the node meets the minimum requirements for
installing and configuring the Oracle Restart and
Oracle Automatic Storage Management software.
Starting with Oracle Grid Infrastructure 11g Release 2 (11.2), if any check fails, the installer (OUI) will create shell script programs called fixup scripts to resolve many incomplete system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button. The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks. If the OUI detected any failed checks, take the appropriate action to resolve it or click the "Ignore All" check box to acknowledge it is safe to continue with the installation without resolving the issue. If all prerequisite checks pass, the OUI continues to the Summary screen. |
![]() |
||||||
| Summary | Click [Finish] to start the installation. | ![]() |
||||||
| Install Product | The installer performs the Oracle Grid Infrastructure for a Standalone Server software installation. | ![]() |
||||||
| Execute Configuration scripts | After the installation completes, you will be prompted to
execute root scripts to configure the Oracle Inventory,
Oracle Grid Infrastructure, and
Automatic Storage Management software.
Note: Do not click OK until you run the scripts mentioned in this screen. Open a new terminal window as the root user account and execute the orainstRoot.sh script. [root@testnode1 ~]# /u01/app/oraInventory/orainstRoot.sh Within the same terminal window stay logged in as the root user account and execute the root.sh script. [root@testnode1 ~]# /u01/app/oracle/product/11.2.0/grid/root.sh [11.2.0.1.0] Go back to OUI and acknowledge the "Execute Configuration scripts" dialog window. |
![]() |
||||||
| Run Grid Infrastructure Assistants | The OUI will continue by configuring Oracle Grid Infrastructure for a Standalone Server using the Oracle Net Configuration Assistant and the Automatic Storage Management Configuration Assistant. Components will then be registered with Oracle Restart. | ![]() |
||||||
| Finish | At the end of the installation, click the [Close] button to exit the OUI. | ![]() |
After the installation of Oracle Grid Infrastructure for a Standalone Server, use the SRVCTL and CRSCTL commands to verify the Oracle Restart configuration.
Use SRVCTL and CRSCTL commands out of the Oracle Home directory for Oracle Grid Infrastructure to modify and view component information for the Oracle Restart configuration. In a terminal window as the oracle user, set the environment to use the Oracle Home for Oracle Grid Infrastructure with . oraenv and enter the ORACLE_SID +ASM when prompted.
|
|
|
|
|
Use SRVCTL to view the Oracle Restart configuration for the Oracle ASM component.
|
Use SRVCTL to view the Oracle Restart configuration for the Oracle Net Listener component.
|
Use SRVCTL to view the running status (running or not running) for any component managed by Oracle Restart.
|
Use ASMCMD and the spget command to retrieve the location of the Oracle ASM SPFILE registered in Oracle Restart.
|
|
|
|
Notice that the state of the ora.diskmon resource is OFFLINE after completing the Grid Infrastructure 11.2.0.3 installation while in previous releases it was ONLINE. Starting with Grid Infrastructure 11.2.0.3, the ora.diskmon resource is used for Oracle Exadata fencing. For a non-Exadata machine, this resource will be OFFLINE.
Run the Oracle Automatic Storage Management Configuration Assistant (Oracle ASMCA) as the oracle user account to create any additional Oracle ASM disk groups that will be used to create the example database described in this guide.
During the installation of Oracle Grid Infrastructure for a Standalone Server, the Create ASM Disk Group wizard only allowed for the configuration of one disk group. Using that wizard, an Oracle ASM disk group named TESTDB1_DATA was created for database files. In this section, create an additional Oracle ASM disk group named FRA for the Fast Recovery Area.
Start the Oracle ASMCA by executing the asmca command as the oracle use account in the Oracle Home for Oracle Grid Infrastructure.
|
| Screen Name | Response | Screen Shot |
|---|---|---|
| Disk Groups | From the "Disk Groups" tab, click the [Create] button. | ![]() |
| Create Disk Group | The "Create Disk Group" dialog should show the
last remaining Oracle ASM candidate disk that
were labeled during the
ASMLib configuration.
If the Oracle ASM disk does not show up in the "Select Member Disks" window as eligible (ORCL:FRAVOL1) then click on the [Change Disk Discovery Path] button and input "ORCL:*". When creating the "Fast Recovery Area" disk group, use "FRA" for the "Disk Group Name". In the "Redundancy" section, choose "External (None)". Finally, check the Oracle ASM disk "ORCL:FRAVOL1" in the "Select Member Disks" section. After verifying all values in this dialog are correct, click the [OK] button. | ![]() |
| Disk Groups | Exit the ASM Configuration Assistant by clicking the [Exit] button. | ![]() |
For the purpose of this example, we will forgo the "Create Database" option when installing the Oracle Database software. The database will be created later in this guide using the Database Configuration Assistant (DBCA) after all installs have been completed.
Before starting the OUI, make certain that the $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/11.2.0/dbhome_1 environment. Setting environment variables in the login script for the oracle user account was covered in the section "Create Login Script for the oracle User Account".
Start the OUI by issuing the following command in the database install directory.
|
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
Now that the Oracle Database 11g Release 2 software is installed, you have the option to install the Oracle Database 11g Release 2 Examples.
Start the Oracle Universal Installer (OUI) by issuing the following command in the examples install directory as the Oracle software owner (oracle).
|
At any time during installation, if you have a question about what you are being asked to do, click the Help button on the OUI page.
Use the Oracle Database Configuration Assistant (DBCA) to create the database.
Before executing the DBCA, make certain that the $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/11.2.0/dbhome_1 environment. Setting environment variables in the login script for the oracle user account was covered in the section "Create Login Script for the oracle User Account".
You should also verify that all services installed up to this point (Oracle TNS Listener and Oracle ASM) are running on the node before attempting to start the database creation process.
|
To start the database creation process, run the following as the Oracle software owner (oracle).
|
When the DBCA has completed, you will have a fully functional Oracle Restart enabled Oracle Database 11g Release 2 database running using Oracle ASM.
From the Oracle home for Grid Infrastructure.
|
|
|
From the Oracle home for Oracle Database.
Verify that the TNS listener is running (lsnrctl status) then log in to the new instance to verify database connectivity and perform a few queries.
|
If you configured Oracle Enterprise Manager (Database Control), it can be used to view the database configuration and current status of the database.
The URL for this example is: https://testnode1.idevelopment.info:1158/em/
|
This section offers several optional tasks that can be performed on your new Oracle 11g environment in order to enhance availability as well as database management.
Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
|
Whether a single instance or clustered database, Oracle tracks and logs all changes to database blocks in online redolog files. An Oracle instance will use its group of online redologs in a circular manner. Once an online redolog fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle will make a copy of the online redo log before it gets reused. A thread (an Oracle instance) must contain at least two online redologs (or online redolog groups).
As already mentioned, Oracle writes to its online redolog files in a circular manner. When the current online redolog fills, Oracle will switch to the next one. To facilitate media recovery, Oracle allows the DBA to put the database into "Archive Log Mode" which makes a copy of the online redolog after it fills (and before it gets reused). This is a process known as archiving.
The Database Configuration Assistant (DBCA) allows users to configure a new database to be in archive log mode within the Recovery Configuration section; however most DBA's opt to bypass this option during initial database creation. In cases like this where the database is in no archive log mode, it is a simple task to put the database into archive log mode. Note however that this will require a short database outage.
Log in to the database as a user with SYSDBA privileges and shut down the instance.
|
After shutting down the instance, mount the database.
|
Enable archiving.
|
Open the database.
|
Verify Archive Log Mode is enabled.
|
DBA's rely on Oracle's data dictionary views and dynamic performance views in order to support and better manage their databases. Although these views provide a simple and easy mechanism to query critical information regarding the database, it helps to have a collection of accurate and readily available SQL scripts to query these views.
In this section you will download and install a collection of Oracle DBA scripts that can be used to manage many aspects of your database including space management, performance, backups, security, and session management. The DBA Scripts Archive for Oracle can be downloaded using the following link http://www.idevelopment.info/data/Oracle/DBA_scripts/dba_scripts_archive_Oracle.zip. As the Oracle software owner (oracle), download the dba_scripts_archive_Oracle.zip archive to the $ORACLE_BASE directory. For the purpose of this example, the dba_scripts_archive_Oracle.zip archive will be copied to /u01/app/oracle. Next, unzip the archive file to the $ORACLE_BASE directory.
For example:
|
The final step is to verify (or set) the appropriate environment variable for the current UNIX shell to ensure the Oracle SQL scripts can be run from within SQL*Plus while in any directory. For UNIX, verify the following environment variable is set and included in your login shell script:
|
Now that the DBA Scripts Archive for Oracle has been unzipped and the UNIX environment variable ($ORACLE_PATH) has been set to the appropriate directory, you should now be able to run any of the SQL scripts in the $ORACLE_BASE/dba_scripts/sql while logged into SQL*Plus from any directory. For example, to query tablespace information while logged into the Oracle database as a DBA user:
|
To obtain a list of all available Oracle DBA scripts while logged into SQL*Plus, run the help.sql script.
|
Starting with Oracle Database 11g Release 2, the dbstart and dbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated. Oracle now recommends to configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, Oracle Automatic Storage Management (Oracle ASM), and other Oracle components after a hardware or software failure or when the database host computer restarts.
This guide presented instructions for creating an Oracle Restart enabled database and does not require any modifications to automate the database startup and shutdown process.
Modifying the /etc/oratab file and setting the restart flag (the last field) to "Y" is no longer required to automatically startup and shutdown the database when using Oracle Restart. For example, the restart flag for testdb1 can remain at "N" and Oracle Restart will still automate the database startup and shutdown procedures.
|
This section contains a set of commands that can be used to manage the Oracle Restart configuration. Use the CRSCTL command out of the Oracle Home directory for Oracle Grid Infrastructure
Check the current status of Oracle Restart.
|
Stop Oracle Restart.
|
Start Oracle Restart.
|
Disable Oracle Restart.
|
This final section contains several miscellaneous options that may be of use to newcomers of Oracle 11g.
During the database creation section, we asked for DBCA to create the Enterprise Manager Database Console application. The DBCA will automatically start the OEM Database Console application. To check for the process, use emctl from $ORACLE_HOME/bin.
|
If you receive something similar to the above output, then OEM Database Console is running. If you need to manually start this application, login as oracle and type the following from $ORACLE_HOME/bin.
|
The OEM DB Console application may take several minutes to start.
Once the DB Console application is up and running, point your web browser to https://<Database_Server>:1158/em as in the following:
|
Login:
User Name: SYSTEM Password: <The password you chose during installation> Connect As: Normal
Oracle Grid Infrastructure for a Standalone Server and the Oracle Database software are installed in two separate Oracle home environments as described in the Oracle Configuration section to this guide. When performing database administration tasks on the machine, it may be necessary to switch between these two Oracle home environments from a terminal session. This requires modifying environment variables like ORACLE_HOME, ORACLE_SID, PATH, LD_LIBRARY_PATH, etc. Although this can be done manually at the command line, it can get old real quick. Instead you can use a single command line script to switch between all database environments declared in your /etc/oratab file.
|
On Linux, the default location for the scripts used to switch your Oracle environment are located in /usr/local/bin.
For example, to switch to the Grid Infrastructure environment, open a terminal window as the oracle user and set the environment to use the Oracle Home for Oracle Grid Infrastructure with . oraenv and enter the ORACLE_SID +ASM when prompted.
|
To switch back to the Oracle Database home environment, enter the name of the Oracle SID for the example database.
|
Notice that in the above example, we didn't just run the oraenv script, but rather, we sourced it by using a dot followed by a space and then the script name oraenv. When sourcing the oraenv script, it will prompt you for the ORACLE_SID, (defined in your /etc/oratab file), you want to switch to. In the above example, if an entry exists for +ASM and testdb1, then all Oracle related environment variables would be set to access the Oracle home environment associated with that entry.
Use the asmcmd command-line utility to manage Oracle ASM disk group files and directories.
Open a new terminal session as the oracle user account and set the ORACLE_SID and ORACLE_HOME environment variables to the Oracle Grid Infrastructure for a Standalone Server environment.
For example, use ASMCMD to list the disk groups for the Oracle ASM instance.
|
Use asmcmd lsdg [group] to list all diskgroups and their information. If [group] is specified, then return only information on that group. The command also informs the user if a rebalance is currently under way for a diskgroup. This command queries V$ASM_DISKGROUP_STAT by default, which can be modified by the --discovery flag and V$ASM_DISKGROUP will be used instead.
This section contains a short list of common errors (and solutions) that can be encountered during the Oracle installation described in this article.
When installing Oracle Grid Infrastructure for a Standalone Server, it is required to either unset the $TNS_ADMIN environment variable or set it appropriately for the Grid Infrastructure environment ($GRID_HOME/network/admin) before starting the Oracle Universal Installer (OUI).
For example, if $TNS_ADMIN is set for the Oracle Database home environment ($ORACLE_HOME/network/admin), the Oracle Net Services Configuration (NETCA) will silently fail with the following error when run as part of the Grid Infrastructure root.sh script.
|
When NETCA fails, no output of the error is written to the terminal session when running the Grid Infrastructure root.sh scrip. The root.sh script configures and starts the Oracle Net Listener and Oracle ASM components but only registers the Oracle ASM component in the Oracle Restart configuration. The default listener does get created and run in Grid home; however, it does not get associated with the Oracle ASM component.
|
If this error goes unnoticed and does not get corrected, you will receive an error using DBCA when selecting to enable Oracle Enterprise Manager.
Oracle Restart enabled database creation requires Default listener configured and running in Grid Infrastructure home. Use NETCA in Grid Infrastructure home - "/u01/app/oracle/product/11.2.0/grid" to configure a listener before proceeding.
The Oracle Net Listener created by the Grid Infrastructure installer (through root.sh) will need to be dropped and recreated using NETCA.
From the Grid Infrastructure home environment, stop the currently running Oracle Net Listener and either unset $TNS_ADMIN or set it appropriately for the Grid Infrastructure home environment (/u01/app/oracle/product/11.2.0/grid/network/admin) as described in the login script for the Oracle user account.
|
Start NETCA and run through the process of creating a default Oracle Net Listener named LISTENER running on the default port 1521.
|
Make certain that the PATH is configured to find emctl from $ORACLE_HOME/bin and not from $GRID_HOME/bin. Running $GRID_HOME/bin/emctl will result in the following error.
|
Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical database design in a UNIX, Linux, and Windows server environment. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 18 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science.
Copyright (c) 1998-2013 Jeffrey M. Hunter. All rights reserved.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.
Last modified on
Wednesday, 16-May-2012 10:35:20 EDT
Page Count: 14655