This section will cover: Part3 – installing Oracle 12c RAC Database Standard Edition
In this section I will show you how to peform two installations of the 12c Database software:
- Installing for an Oracle Standard Edition RAC environment
- Installing Oracle Standard Edition on a standalone environment
All my servers have at this stage been configured, in summary the following prerequisite steps were performed (see Part 1 and Part 2 for more details):
- Oracle Linux 6.4 x86_64 was installed on all 3 servers with required software packages
- Both “oracle” and “grid” users were created and correct groups assigned
- Following groups were created: oinstall, asmadmin, asmdba, asmoper, dba, oper
- Ensure you have SSH user equivalence setup for both the grid and oracle user accounts allowing password-less authentication by making use of public/private keys.
- Oracle Grid Infrastructure is installed on the 2 node cluster environment as well as the Single instance server and both the DATA and FRA disks groups were configured on each of these environments (Covered in Part 2)
The Database software installation consists of two zip files and you need to download them from the Oracle web site here
- linuxamd64_12c_database_1of2.zip (1,361,028,723 bytes) (cksum – 3389130601)
- linuxamd64_12c_database_2of2.zip (1,116,527,103 bytes) (cksum – 273248753)
Once downloaded and unzipped you will end up with a “database” directory, which contains the installer. Once again I placed the install files on an NFS server and I just mount that on all my systems. So I now have /install/12c/database available on all systems, and inside the “database” directory are all my database install files. This way there is no duplicate installation source files, but they are all in once place from where I share it to the systems on which I want to install it.
Installing for an Oracle Standard Edition RAC environment
When installing Grid Infrastructure (GI) for a cluster, it is recommended you make use of the cluster verification utility script supplied by Oracle and run this as a pre-check to make sure all is configured and is ready for the installation to continue. However, once you have finished the GI installation, you can also run the utility to confirm the environment is ready for a database install, and it can be done by running the following command:
grid@kiwi101[/home/grid]: cluvfy stage -pre dbinst -n kiwi101,kiwi102
In my environment all checks passed except for the Memory and Swap. And as I know that 4GB memory and 2GB swap is fine for a test system I ignore the warning and continue on with the installation.
Example install location (install source) in my environment:
oracle@kiwi101[/home/oracle]: cd /install/12c/ oracle@kiwi101[/install/12c]: ls -l total 4326400 drwxr-xr-x 7 root root 3896 Jun 11 00:14 database drwxr-xr-x 7 root root 3896 Jun 11 00:15 grid -rw-r--r-- 1 root root 1361028723 Jun 26 11:24 linuxamd64_12c_database_1of2.zip -rw-r--r-- 1 root root 1116527103 Jun 26 11:26 linuxamd64_12c_database_2of2.zip -rw-r--r-- 1 root root 1750478910 Jul 1 10:40 linuxamd64_12c_grid_1of2.zip -rw-r--r-- 1 root root 201673595 Jul 1 10:40 linuxamd64_12c_grid_2of2.zip oracle@kiwi101[/install/12c]: cd database oracle@kiwi101[/install/12c/database]: ls -l total 256 drwxr-xr-x 4 root root 3896 Jun 26 12:15 install drwxrwxr-x 2 root root 3896 May 25 08:43 response drwxr-xr-x 2 root root 3896 May 25 07:29 rpm -rwxr-xr-x 1 root root 7808 May 25 07:29 runInstaller drwxrwxr-x 2 root root 3896 May 25 08:43 sshsetup drwxr-xr-x 14 root root 3896 May 25 08:43 stage -r-xr-xr-x 1 root root 500 Jun 10 17:52 welcome.html
Starting the Oracle Database Cluster (RAC) Installation
Note that in this example I will show you the installation steps for Oracle 12c Standard Edition, but I am going to split it into two sections.
1. Installing the database software only
2. Using the Database Configuration Assistance, DBCA to create the database
You can combine the two steps in one and create the database as part of the installation, but here I will also show you the DBCA. So do not worry if you want to do both at the same – that is fine, and you can – as the steps are similar.
1. Installing the Database Software (Oracle RAC Install)
I login to my first node kiwi101 as the “oracle” UNIX account and start the installation by running the “runInstaller” file:
oracle@kiwi101[/install/12c/database]: ls install response rpm runInstaller sshsetup stage welcome.html oracle@kiwi101[/install/12c/database]: ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 3052 MB Passed Checking swap space: must be greater than 150 MB. Actual 2033 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-28_11-26-57AM. Please wait ... oracle@kiwi101[/install/12c/database]: You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2013-07-28_11-26-57AM.log
Once the installer opens, the option to receive security updates via My Oracle Support is selected. I deselect this and click on next to continue. You will receive a pop-up window asking for confirmation that you do not want these updates. I select yes and continue.
On the next screen you configure settings with regards to software updates. I accept the default, which is to skip software updates.
As I am only going to perform a software installation, I change the option from the default to “Install database software only” and click on next to continue.
I am working on an Oracle RAC installation and so make sure “Oracle Real Application Clusters database Installation” is selected and click on next to continue.
On the “Node Selection” screen I make sure both my nodes (kiwi101 and kiwi102) are selected and I click on next to continue.
I accept the default language setting (English) and continue.
I am specifically looking at installing Standard Edition and select this option in the “Database Edition” screen, and click next to continue.
I review the installation location and update the Software Location to /u01/app/oracle/product/12.1.0/db_1 and click next to continue.
With 12c you now have 3 additional groups that can be configured with regards to backup and recovery, Data Guard and Encryption. In this example I am not going to specify different groups for these and will use the default DBA group.
During the verification process I receive a warning with regards to my swap space. I ignore this and continue.
The Installation Summary is displayed. I review and click on install to continue.
The installation process starts and takes a few minutes to complete. This time will vary depending on the hardware you are using.
At the end of the installation I am requested to run the “root.sh” script as the root UNIX account on both nodes. This script is located in the newly installed Oracle database software home.
I open an ssh connection to these servers and execute the “root.sh” script, accepting the default values.
I do the same on the second node.
Once the root.sh scripts have been executed, which only takes a few seconds, I go back to the installer and click on OK to continue.
This brings me to the end of the database software installation. I now have the Oracle Database Standard Edition software installed, but no RAC database yet. This will be done in the next section.
Creating the Database using the Database Configuration Assistant (DBCA)
I am now going to make use of the Database Configuration Assistant (DBCA) to create my RAC database, which I will call DEV. To start this utility, you run the dbca command from the $ORACLE_HOME/bin directory as the “oracle” UNIX account.
In the example below I first connect to my primary node 1 (kiwi101) as the “oracle” account, then start the dbca utility.
# ssh -C -X email@example.com firstname.lastname@example.org's password: Last login: Sun Jul 28 12:15:00 2013 from 192.168.40.138 oracle@kiwi101[/home/oracle]: oracle@kiwi101[/home/oracle]: oracle@kiwi101[/home/oracle]: oracle@kiwi101[/home/oracle]: cd /u01/app/oracle/product/12.1.0/db_1/bin oracle@kiwi101[/u01/app/oracle/product/12.1.0/db_1/bin]: oracle@kiwi101[/u01/app/oracle/product/12.1.0/db_1/bin]: oracle@kiwi101[/u01/app/oracle/product/12.1.0/db_1/bin]: ./dbca
Once the DBCA starts I accept the default-selected option which is to “Create Database” and click on next to continue.
You now have the option to use default settings and create a database, or use the “Advanced Mode” to allow you to customize you database setup a little. I select the “Advanced Mode” and move on to the next screen.
From the Database Type drop down list, I select “Oracle Real Application Clusters (RAC) database” and the configuration type as “Admin-Managed”. I accept the default template, which is a General Purpose database and click on next to continue.
I specify my database name as DEV, and click next to continue.
When presented with the Database Placement screen I make sure that both nodes are selected and click next to continue.
Under the Management Options screen I only specify to configure using the Enterprise Manager Database Express.
For this test environment I am going to use the same basic password for the SYS and SYSTEM accounts.
Under the Storage Locations screen I make sure that the storage type makes use of ASM. I specify the +DATA disk group as my database file location. It is recommended to Multiplex the redo logs and control files, and when you click on it, type in +DATA and +FRA as your two locations.
I also specify a Fast Recovery Area as my +FRA disk group and, finally, select the option to enable archiving which is important and recommended. I do not edit the archive mode parameters but accept the defaults. Archive logs will be located by default in the Fast Recovery Area.
When presented with the Initialization Parameter screen, I update the memory to 1024M, which should be sufficient for this test environment, and under the Character set tab I adjust the settings.
Under the Character set tab I specify to use Unicode (AL32UTF8) and update my Default Territory to New Zealand. You can adjust these to your requirements.
I now get to the Creation Options screen and accept the default to create the database. I click on next to continue.
Again the validation checks provide me with a warning around my swap space. I select the option to ignore it and click on next to continue.
A summary screen is displayed, I quickly review and click on Finish to start the database creation.
The database creation started and only took a few minutes to complete in my environment
Now that the installation is complete, I run a few quick checks to validate that my database is created and running. I now have a DEV Oracle Standard Edition RAC database running with instance DEV1 running on node 1 (kiwi101) and DEV2 instance running on node 2 (kiwi102).
Before I continue with the Standalone Server installation I do want to mention the “srvctl” command, which hopefully you are familiar with. If not, this is the command line utility you can use to perform some of the management tasks such as stopping and starting the database.
Below are a few example commands:
oracle@kiwi101[/home/oracle]: . oraenv ORACLE_SID = [DEV] ? DEV The Oracle base remains unchanged with value /u01/app/oracle oracle@kiwi101[/home/oracle]: srvctl status database -d DEV Instance DEV1 is running on node kiwi101 Instance DEV2 is running on node kiwi102 oracle@kiwi101[/home/oracle]: srvctl status asm ASM is running on kiwi102,kiwi101 oracle@kiwi101[/home/oracle]: srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): kiwi102,kiwi101 oracle@kiwi101[/home/oracle]: srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node kiwi102 SCAN Listener LISTENER_SCAN2 is enabled SCAN listener LISTENER_SCAN2 is running on node kiwi101 SCAN Listener LISTENER_SCAN3 is enabled SCAN listener LISTENER_SCAN3 is running on node kiwi101 oracle@kiwi101[/home/oracle]: srvctl status instance -d DEV -i DEV1 Instance DEV1 is running on node kiwi101 oracle@kiwi101[/home/oracle]: srvctl config database -d DEV Database unique name: DEV Database name: DEV Oracle home: /u01/app/oracle/product/12.1.0/db_1 Oracle user: oracle Spfile: +DATA/DEV/spfileDEV.ora Password file: +DATA/DEV/orapwdev Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: DEV Database instances: DEV1,DEV2 Disk Groups: FRA,DATA Mount point paths: Services: Type: RAC Start concurrency: Stop concurrency: Database is administrator managed oracle@kiwi101[/home/oracle]: srvctl stop database -d DEV oracle@kiwi101[/home/oracle]: srvctl status database -d DEV Instance DEV1 is not running on node kiwi101 Instance DEV2 is not running on node kiwi102 oracle@kiwi101[/home/oracle]: ps -ef|grep pmon grid 11688 1 0 Jul27 ? 00:00:11 asm_pmon_+ASM1 oracle 17943 16365 0 16:38 pts/0 00:00:00 grep pmon oracle@kiwi101[/home/oracle]: srvctl start database -d DEV oracle@kiwi101[/home/oracle]: srvctl status database -d DEV Instance DEV1 is running on node kiwi101 Instance DEV2 is running on node kiwi102 oracle@kiwi101[/home/oracle]: ps -ef|grep pmon grid 11688 1 0 Jul27 ? 00:00:12 asm_pmon_+ASM1 oracle 17993 1 0 16:39 ? 00:00:00 ora_pmon_DEV1 oracle 18203 16365 0 16:39 pts/0 00:00:00 grep pmon
Installing Oracle Standard Edition on a standalone environment
The final step I would like to show you in this section is the installation of the Oracle 12c Database in a Standalone Node installation. In the previous section I showed how to install the Grid Infrastructure software on a standalone node (kiwi103), which will be my standby database. In the video below I quickly show you the steps I took to install the database software on this server.
Once the installation is complete on the Standalone server you need to make sure the $ORACLE_HOME/bin/oracle executable has the correct permission. Without the correct permission on this executable you will potentially get ORA-15025 errors, as you will not be able to see the ASM storage when creating a new database manually. For more details see this MOS note: 1084186.1.
The steps to perform are to login as the “grid” UNIX account and then run the setasmgidwrap command. This will then set the correct permission on the “oracle” executable. Example:
root@kiwi103[/u01/app/oracle/product/12.1.0/db_1/bin]: ls -altr oracle -rwsr-s--x 1 oracle oinstall 282183593 Jul 28 17:49 oracle root@kiwi103[/u01/app/oracle/product/12.1.0/db_1/bin]: cd root@kiwi103[/root]: su - grid grid@kiwi103[/home/grid]: . oraenv ORACLE_SID = [grid] ? +ASM The Oracle base remains unchanged with value /u01/app/grid grid@kiwi103[/home/grid]: setasmgidwrap o=/u01/app/oracle/product/12.1.0/db_1/bin/oracle grid@kiwi103[/home/grid]: ls -al /u01/app/oracle/product/12.1.0/db_1/bin/oracle -rwsr-s--x 1 oracle asmadmin 282183593 Jul 28 17:49 /u01/app/oracle/product/12.1.0/db_1/bin/oracle
In Part 1 to 3 of this series I showed you how to install an Oracle 12c Standard Edition RAC environment with a database configured, as well as installing the software on a Standalone server which can now be used as a standby database server.
Over the next few days I will post Part 4 showing how to install the latest version of Dbvisit Standby to create and maintain a standby database in this environment.