1829407 Members
1896 Online
109991 Solutions
New Discussion

Oracle + SG

 
jpcast_real
Regular Advisor

Oracle + SG

I must configure the control script for an Oracel db in a SG environment . Can anyone give me a model where the startup and shutdown scripts for Oracle are configured . I am trying to use the dbstart and dbshut utilities.
Here rests one who was not what he wanted and didn't want what he was
8 REPLIES 8
Elmar P. Kolkman
Honored Contributor

Re: Oracle + SG

They should be called from the user commands section. Mind that the control script is run as root, so you need to do a su - oracle. And need to make sure the right oracle instance is selected.
Every problem has at least one solution. Only some solutions are harder to find.
jpcast_real
Regular Advisor

Re: Oracle + SG

My question is how do I have to start Oracle y se package SG control script . Do I have to introduce it as a "Service" or in the "Customer defined functions" area ????

With the scripts dbstart and dbshut and a correct configuration of /etc/oratab , root has the capabilities to start Oracle correctly . Isn't this procedure enough??

Can anyone give me a model???
Here rests one who was not what he wanted and didn't want what he was
melvyn burnard
Honored Contributor

Re: Oracle + SG

There is a toolkit available as part of the Enterprise Cluster Master Toolkit that makes this a lot easier for you.
see:
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B5139EA
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
jpcast_real
Regular Advisor

Re: Oracle + SG

Ok , but this product is not free ???? Where can I find something free ????
Here rests one who was not what he wanted and didn't want what he was
G. Vrijhoeven
Honored Contributor

Re: Oracle + SG

Javier,

Depents how oracle is installed. We always install it i an package. Do multiple packages = multiple oracle installations.
Normally oracle is started en stopped with the dbstart en dbshut command. In a package you can do the same from the customer_defined_run_cmds and halt_cmds.

Just do su - oracle -c "/path/dbstart"
and
su - oracle -c "/path/dbshut"
Make sure the env settings are correct. ( You can set them in the dbshut / dbstart script.

HTH,

Gideon
Rita C Workman
Honored Contributor

Re: Oracle + SG

Our DBA's create their start/stop scripts and keep them in the Oracle home directory.
As root, I write my own little scripts (one for the startup and one for the shutdown) that does what was mentioned above:
su - oracle /oracle_home/
I save my file under /usr/local/bin.

With that file I can use it anytime I have to jump in and just stop/start the db manually. AND I use the same thing to control the start/stop of the database with MC/SG. I generally reference it in the respective user_defined_start and stop areas of the pkg control file.
/usr/local/bin/oracle_home/
Hope it helps,
Rgrds,
Rita


Geoff Wild
Honored Contributor

Re: Oracle + SG

You call your script from the "CUSTOMER DEFINED FUNCTIONS"

function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
/etc/cmcluster/YOURPACKAGE/YOURPACKAGE.cntl any parameters
test_return 51
}

For example, one of mine is:

function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
/etc/cmcluster/PRDBCI/sapdbci.cntl startDBCI PROD
test_return 51
}

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.

Re: Oracle + SG

Ok, the Enterprise Cluster Master Toolkit isn't free, but its not very expensive (compared to Serviceguard itself), and it gives you a solution supported by HP, rather than giving you scripts you need to maintain yourself.

If you can afford serviceguard, and all the kit in terms of shared disk & networking required to operate a cluster, an extra few $$$s for the toolkit shouldn't break the bank. I for one wouldn't trust dbshut/dbstart provided by oracle *at all*, they are terrible scripts designed to be run interactively from the command line by a DBA who can take remedial action when they don't work.

just my $.02 ...

Duncan

I am an HPE Employee
Accept or Kudo