1834742 Members
2817 Online
110070 Solutions
New Discussion

Oracle and SG

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

Oracle and SG

Hi,

1. Is Oracle toolkit included in standard SG product, or it is a seperated product and need to pay extra money for it?

2. If it is a seperated product, how I configure the oracle startup/shutdown procedures in configuration file(s)/script(s), any detailed completed documents?

Thanks,

Points will be assigned.

Roger
none
4 REPLIES 4
Hanry Zhou
Super Advisor

Re: Oracle and SG

3. Should I install oracle on each of 2 nodes in the cluster, or install one of them only?

4. where I should put oracle startup/shutdown steps, and how about applicatoins relying on the oracle?

5. what processes I need to monitor in the Service script?
none
George Petrides_1
Honored Contributor
Solution

Re: Oracle and SG

As far as I remember there was a database toolkit that contain control scripts for database. The interesting part was the monitoring of the database and re-starting them. I don't remember how much HP charged for them, but frankly if you are good in shell scripting then don't bother buying them, if not then you can get a tested script and procedure by buying the toolkit.
To understand how to control the databases from MC/SG then you should read about the product. You group your applications in packages and this requires good planning in order to do a good job. Each package has a configuration and a control script. In the control script you specify which script and/or command to use in order to startup/shutdown the databases. You still start the databases with svrmgrl.. or the dbshut/dbstart script, however, these are no longer called from the startup scripts (/sbin/rc.d/...) but from the MC/SG control script (e.g. /etc/cmcluster/dbpackage1/control.sh)
Unfortunately, I am at home and don't have a sample script handy to attach here).
You use MC/SG for high availability and in order to achieve that, you need to do an analysis of your environment and make sure you have two of everything (computer, power, network cards, Operating System, etc.). Although you can have the Oracle binaries failover from one machine to the other along with the instances, however, if you have two Oracle servers on both machines then if for example someone deletes the oracle_home directory you can still failover and continue work before beating the hell out of the guy who did the rm -r $ORACLE_HOME... but you'll have to maintain two Oracle servers (patches, upgrades, etc.)
Regarding applications that rely on Oracle, I would put the in the same package just to make things simpler, although Oracle could be a different package but when Oracle switches from one machine to the other for example, it will cause a bit of a downtime until your apps can re-connect. Also, the simpler the environment, the easier it is to maintain (and with MC/SG your environment will get more complex just by clustering).
I usually monitor the pmon process, however, make sure you add something like a flag file to your script that if the monitor sees this file it will ignore monitoring your database, else, if you try and stop it manually (svrmgrl) and not through MC/SG, then MC/SG will try and re-start the database (depending on your settings) or even switch it.
I would also monitor the listener process and the application processes. Monitoring is usually done with a ps -ef | grep process | grep -v grep -gt 0 command in a while loop. Don't just copy a script from someone else, try and understand the control script and how things work else you will regret the day you implemented MC/SG... Hope this helps,
George
Stephen Doud
Honored Contributor

Re: Oracle and SG

Hello Roger,

1. The Oracle toolkit is actually a part of the Enterprise Cluster Master toolkit, product number B5139DA. It has a nominal purchase cost.

2. It is no small thing to implement an Oracle package. The ORACLE.sh that comes in the toolkit is 529 lines (including comments). The Oracle.sh contains the Oracle environment declarations, application startup, shutdown and monitor functions. Depending on the way the script is called ("ORACLE.sh start", "ORACLE.sh stop", or "Oracle.sh monitor") the script will operate differently.


If you are not comfortable writing scripts and do not want to purchase the toolkit canned script, consider the services of a consultant to implement an Oracle package.

3. I believe Oracle requires a license per node, which means that each server should be loaded with a copy of Oracle.

4. The administrator normally places the Oracle package control scripts under /etc/cmcluster - specifically in a directory (name of your choosing) such as "orapkg". The package control script startup functions execute application-related processes in this order

customer_defined_run_cmds
start_services

Launch "ORACLE.sh start" in the customer_defined_run_cmds section and then set up "Oracle.sh monitor" as a SERVICE_CMD for start_services to operate.

5. The processes that must be monitored are ora_pmon_${SID_NAME} ora_dbw0_${SID_NAME} ora_ckpt_${SID_NAME} ora_smon_${SID_NAME} ora_lgwr_${SID_NAME} ora_reco_${SID _NAME} ora_arc0_${SID_NAME}

As I indicated, it's a complex task - one that the forums is not well suited to tackle without handing over an entire script.

-s.
Julio Yamawaki
Esteemed Contributor

Re: Oracle and SG

More informations about Oracle with MC/SG:
1. It's possible to install Oracle binaries in two machines, because Oracle is licensed in a per user basis
2. You have to monitor the listener process: lsnrctl
3. If you install Oracle binaries in two machines, don't forget to separate or update the files: listener.ora and tnsnames.ora, that will be place in the directory $ORACLE_HOME/network/admin