Operating System - HP-UX
1834130 Members
2837 Online
110064 Solutions
New Discussion

Do I need to halt package while I'm doing Oracle upgrade?

 
Hanry Zhou
Super Advisor

Do I need to halt package while I'm doing Oracle upgrade?

We are going to do Orcle upgrade to 9.x, and I don't believe we should halt the package. Am I right?
If that is true, what would happent if we did halt the package before Oracle upgrade was started?
none
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

You should halt the package according to the instructions Oracle provides.

Parts of the upgrade may require the database to be up, in which case you need to have the package running.

Parts of the installation will require the database to be down in which case you want to halt the package and make sure it doesn't fail over to the secondary node, because data access may be required.

In general, you go according to the Oracle instructions. Based on those you decide whether to halt the package or not.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TwoProc
Honored Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

This is how we handle it...
Leave the package running while you patch (assuming you've got all your users off).

Create a file called "monitor" in your /etc/cmcluster/[package_name]/ directory.
just use "touch /etc/cmcluster/[package_name]/monitor"

This will allow you to bounce oracle up and down as needed to patch per the instructions for the Oracle patch you're applying. The "monitor" file tells the system to leave the package alone (and up and running) "for the duration", that is, until you remove the file.
We are the people our parents warned us about --Jimmy Buffett
Tim D Fulford
Honored Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

I'm assuming you mean ServiceGuard package here... To do the upgrade you will need oracle to be active at times to perform the upgrade/scan on the DB data. If you halt the package then the volume groups that contain your shared oracle data will be inactive & inaccessable.

There are two ways to tackle this
1 - turn off application/Oracle engine monitoring (if you have it), then stop Oracle & do upgrade, when you have finished turn it on again. For this case you do not stop the package
2 - stop the package (NOT the cluster, just the package)
# cmhaltpkg orapkg
activate all Oracle volume groups
# vgchange -a e vgora vgora2 vgoraredo
Assign IP aliases as IF the package were alive
# ifconfig lan0:1 193.164.192.100 (or what ever you have)
Now you can bring Oracle up & down outside of ServiceGuard & do the upgrade outside of SG
now revewrse the above
...
# stop Oracle
# ifconfig lan0:1 0.0.0.0
# vgchange -a n vgora vgora2 vgoraredo
# cmrunpkg orapkg

As you can see the latter option is far more complicated & prone to errors!! Speaking from experience, chhose option 1

Regards

Tim
-
Hanry Zhou
Super Advisor

Re: Do I need to halt package while I'm doing Oracle upgrade?

I'm still not that clear on wheather or not I should halt the package while I'm doing the upgrade.

What Tim said seems to make more sense. However, in my case, I don't have Monitor to monitor any oracle processes, so does that mean I need to keep pkg running, and don't need to do any thing before start the upgrade?
none
Julio Yamawaki
Esteemed Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

Hi,

I made an upgrade of a package running Oracle 9i instance to Oracle 10g last month.
What I did:
1. Stop package
2. Mount filesystems manually
3. Installed Oracle 10g (configured listener.ora, tnsnames.ora, ...)
4. Made all upgrades
5. Reconfigured packages with new ORACLE_HOME...
6. Stopped Oracle instance
7. Umounted filesystems
8. Started package again (don´t forget to test failover of packages and any other thing affected by the upgrade process, like connections)

Regards
Devesh Pant_1
Esteemed Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

Yes,
halt the package.
mount the filesystems manually after going through the vgchange stated above
If you have different paths/scripts/ listener startup changes after the upgrade don't forget to make changes to the package if required by using cmcheckconf -C /etc/cmcluster/clustername -P /etc/cmcluster/packagename/configfile.config
and then apply it using the cmapplyconf

Try to bring the package up on first server and then fail it over to the other.

thanks
Devesh
Hanry Zhou
Super Advisor

Re: Do I need to halt package while I'm doing Oracle upgrade?

I don't think I need to halt the package in my case.

Because we don't have Monitor to monitor Oracle processes, therefore, there will be no failover in the cause of Oracle shutting down. So, why bother to halt the package and then manually mount file systems? I can still keep package running, and therefor keep all shared vg's active, all fs's mounted. After the upgrade is completed, I can test the failover.

Can anybody tell what is wrong with what I have said above?
none
Julio Yamawaki
Esteemed Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

Hi,

You don´t need to halt package during the upgrade process, but what about your package configuration? Are your ORACLE_HOME going to be the same as before upgrade process?
If not, you need to stop package and re-configure the package.

Regards,
Faizer Jameel
Frequent Advisor

Re: Do I need to halt package while I'm doing Oracle upgrade?

In my opinion you keep the package running
stop the database. Do the upgrade.
Note:
If there has been any path change to any scripts that are in the package control scripts that calls any functions in Oracle, then you do need to have them corrected accordingly otherwise you would not be able to bring up the package after a shutdown.
Tim D Fulford
Honored Contributor

Re: Do I need to halt package while I'm doing Oracle upgrade?

I'll try again. My previous reply gave two option stop package & keep package going. Basically
o Dont stop package... You need to know how SG works and some of the methods it uses to monitor itself
o Do stop package ... this is the "safe" option if you do not know the innards of SG. Unfortunately you now need to know how to activate volume groups & alias IP to make the system look like it is up & running but without the SG monitoring options. In essence you need to know how ServiceGuard works. Which, ironically, is why you chose this option in the first place.... hmmm not nice

Given that phrases like rock & hard place come into play I'll try and give you some pointers...

Some questions that need answering & some possible investigations:

Q1- If you stop Oracle will it detect this & fail over? You MUST be certain about this, so "I think so" is not good enough.
I1 - Within ServiceGuard there is a monitor service. I've seen implementations where this is simply a script that says "while :; do; sleep; 60; done" Which basically stays alive forever. If you do "cmviewcl -v" there will be a section called "Script_parameters" beneath that a column called ITEM and a row starting with "Service". Beneath the NAME colum on the same row as "Service" is a service script, say mon_ora. This will be a script or binary that monitors your Oracle Instance. As I said above it is perfectly feasable for this to be a "dummy" or "dumb" script that always returns true. if this is the case, then stopping the Oracle instance will NOT fail over the package. If it is an intelegent script/binary then it may well have a mechanisim to "unmonitor" it... you will need to look into this.

Q2 - Assuming the answer to the above is ... "I dont know", with a pintch of "I'm not sure" or even a hint of "I'm confused & want to go home".. then Does Oracle use the floating IP adress?
I2 - The investigation for this is going to be slightly trickier, as all I know about Oracle Admin is how to spell it (but I do know about databases/Informix, so I will extrapolate). When your Oracle instance starts up it will, in general, open up ports on IP address. Sometimes the floating IP is used for this, & sometime the static host IP is used (and the application will use the floating IP & everything talks through the app). Oracle will have some listening ports/threads, and a good dba/sysadmin will put them in the /etc/services, so all you need to do is do a netstat -na | egrep and bingo you will instantly be able to deduce if the port is on the floatring or static IP. If that option is not available, then list ALL Oracle PIDs & use glance -F to go through them all, eventually you will hit some that are the listening/poll threads & these will list the IP & ports being used.

If you do use the floating IP for Oracle, then you will be in a poor position as the only safe option is to stop the package. Activate the vgs outside of SG & ifconfig the floating IPs onto your lan cards/NICs.
vgchange -a e vgxx
mount .... (if you use mounted filesystems)
ifconfig lan0:1 x.y.z.h
:: etc ::

If you do NOT use the floating IP. Then you can stop the package & simply activate the volume groups outside of SG
vgchange -a e vgxx
mount .... (if you use mounted filesystems)
:: etc ::

I appriciate the above may be confusing, but this is the best I can do without actually logging onto your system!!!!

Regards

Tim
-