2.02.2012

VCS: Adding Oracle databases located in Solaris zones

Here is a script which I wrote to assist in the addition of Oracle databases running inside of a Solaris zone to a VCS configuration. The script does not actual modify the main.cf, rather it creates a shell script for each zone it finds new databases that need to be added to the VCS configuration. The output scripts are titled ZONENAME.dbvcs. The hares statements are included to create the needed resources are scripted if three criteria are met:
  1. The database is not already included in the main.cf configuration
  2. The database is currently running
  3. The oratab file indicates the database in question should be automatically started on boot.
Additionally Listener resources are added as well, provided that they are running at the time of script execution. Again if the listener is already included in the main.cf then the hares commands for the NetLsnr are not included. 

One final note the naming convention in our VCS configurations are quite rigid; therefore all zone resources are name zn_ZONENAME; IP addresses are ip_ZONENAME; Listener lsnr_ZONENAME; database pmon_ZONENAME.

No comments: