Wednesday, May 11, 2011

How to Configure Oracle Restart on Standalone Server


In one of my previous post, I had talked about Oracle Restart – a new feature in 11gR2 that enhances availability in case of single/standalone instances. In this post, I am briefly describing the steps to install and use this great feature for an existing database installation.
Oracle Restart is part of Oracle Grid Infrastructure which needs to be installed without which Oracle Restart cannot be used. One either installs Grid infrastructure first and database later or vice-versa. The difference being that the components either gets automatically added to Oracle restart configuration (if Grid is installed first) or need to be manually added (In case DB is installed first and Grid later).
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. Basically it combines “Oracle Restart” and “ASM” into Grid binaries. So, to use Oracle Restart or ASM, installing grid infrastructure is a MUST (which of course I don’t like). Is there license implication?
Further, Oracle Restart can only manage 11.2 resources. However, Oracle database releases prior to 11.2 can coexist on the same server but without being managed by Oracle Restart.
Is it a separate binary?
Yes, a separate binary available for download - http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_grid.zip
However if you download the latest version 11.2.0.2 (from metalink) then you do not need to download the above. Grid is part of the installable. What I don’t like is installing Grid even for “Oracle Restart” only.

How to install?
There are 2 options. When you start installing the grid, it throws the following screen; if you just want to install Oracle Restart then choose “Install Grid Infrastructure Software Only” else choose “Install and Configure Grid Infrastructure for a Standalone Server” which will ask for ASM configuration details.Ensure that the grid infrastructure components are installed in a separate Oracle home.
 
To continue the installation, just  follow the screenshots below; the above screenshot is the first step when you run "./runInstaller" from installable folder.





 
At the end of the installation you are required to run the “root.sh” script to successfully complete the installation. Please note that you need to run the script as “root” user.
#/u01/app2/product/11.2.0/grid/root.sh


What do I need to Configure?
Next is to run “roothas.pl” script to ensure to configure Grid Infrastructure for a stand-alone server. Run the following command as the root user:
#/u01/app2/product/11.2.0/grid/perl/bin/perl -I/u01/app2/product/11.2.0/grid/perl/lib -I/u01/app2/product/11.2.0/grid/crs/install /u01/app2/product/11.2.0/grid/crs/install/roothas.pl

One last step before we can term “Oracle Restart” configuration to be complete and add components to it.
# cd $ORA_GRID_HOME/bin
# crsctl enable has
So that’s it! “Oracle Restart” is now configured on your standalone server.
How to add components to Oracle Restart
1.      Add the existing database to “Oracle Restart”
$ srvctl add database –d -o <$ORACLE_HOME> -p -s -t
$ srvctl add database -d testdb -o /u01/app/oracle/product/11.2.0/dbhome_1 
2.      Add listener
$ srvctl add listener –l LISTENER -o /u01/app/oracle/product/11.2.0/dbhome_1
Can I turn off Oracle Restart?
Yes; first check the current status of auto start and then simply run the command (as “root” user) to turn off the autostart option.
#crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
#crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.
Conclusion
That completes the Oracle restart installation and configuration.It's nice feature to have on a standalone instance/server. The best part is the manual procedures we used to adopt to start/stop all components of database and the shell scripting required is gone. And of course, get braced up for they way things work in a RAC environment. Let me know your feedback.

1 comment:

Unknown said...

I want to use ASM also for a clustered OS environment (Solaris sparc-64 bit operating system with sun cluster 3.2).
If i select grid infrastructure software only option How to configure the ASM instance?? could you please tell me.. FYI- Grid_Home will be in local disk only.. not in shared storage..