Operating System - HP-UX
1752603 Members
5452 Online
108788 Solutions
New Discussion юеВ

Re: Oracle Startup / Shutdown Script

 
SOLVED
Go to solution
Rory R Hammond
Trusted Contributor

Re: Oracle Startup / Shutdown Script

RE: S. Protter statement that
his shutdowns sometimes "hangs". Shutting down Oracle using the oracle supplied dbshut normally should never hang if You FIRST modify the scripts as noted in a previous thread, by changing to "shutdown immediate" from just "shutdown". Out of the box oracle supplied dbshut script only has "shutdown". A "shutdown" without the immediate or abort option gives the appearance of Oracle hanging, because it is waiting for everyone to logout. I do not recommend "shutdown abort" as an accepted method for taking oracle down. If you have to do an abort, It would be wise to find out what is hanging your Oracle instance. The "hang" might be caused by a long transaction being rolled back or Archive log space is full.

On my system I do not have the luxury to have regular downtimes for backups. All our backup are hotbackups. . We schedule the backups during non peak times. Recovery and full restoral has not been a problem. You should automate Oracle shutdown/startup for OS System reboots. Which is why dbshut/dbstart is associated with /sbin/init.d /etc/rc.d etc.. I also think normal backups should be done without shutting down oracle. If the shuting down of oracle "cleans" things up, time would be better served finding out why unwanted processes/thread/client sessions "things" are hanging around.

I will get off my soap box now.
Good Luck
Rory
There are a 100 ways to do things and 97 of them are right
Gus Mestousis
Frequent Advisor

Re: Oracle Startup / Shutdown Script

I have tried in the past to backup the databses while they are still up, and experience great difficulty on the restores. Due to the environment that I am in, I only have the luxury of shutting them down for a couple f hours during off-peak weekend use. The daily backups are done with the db up, and usually don't work when restoring. Have you had success restoring databses that you backed up while they were up? I am using Omniback, and am looking into adding the Online Extension to it for this reason, in the mean time I feel more comfortable knowing I have a good set every week with the db in a down state.

Thanks everyone for the replies. I'll be sure to assign points to all.

Gus
Sure, let me just drop everything and work on your problem.
Andreas D. Skjervold
Honored Contributor

Re: Oracle Startup / Shutdown Script

Hi

To your question about runnig online backups; use Oracle Recovery Manager (RMAN).

It lets you do online backup (full or incremental) and all kinds of recovery scenarioes.

Do not know if you have to use some software to connect to Omniback. We use Legato and this requires an rather expensive module for connectiong the RMAN to the Legato software (but it works well)

rgds
Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Yogeeraj_1
Honored Contributor

Re: Oracle Startup / Shutdown Script

Hi,

As Andreas said above, RMAN is the way to go!

BECAUSE

RMAN decreases the chance of you making a mistake.

do you regularly test your backups?
I was with a customer who wanted to know why their system was down for days -- yes, days. Why so long? Well, they had a problem, had to restore from backup. Never tested said backup. Discovered all of a sudden their script kicked off the copies BEFORE the alter tablespace begin backup. Whoops - System was fried. Support helped them scavenge what they could but basically, it was a rebuild of the entire big database. That would not happen with RMAN -- less for them to think about, less mistakes possible.

Consider the following also:
You have a single bad block in a 16gig datafile, you are using RMAN in 9i. What do you do? You do an in place recovery of just the bad block, you do not offline the datafile, you do not offline the tablespace, you do not do 16gig of IO to restore the file, you do not roll 16gig of data forward. You recover an individual 8k block.

What would have happened if you didn't use RMAN?
take tablespace offline, restore 16gig, roll it forward then bring it online.

Which gives you less downtime?
Which fully recovers the fastest?
Which would you prefer to do?

In the end -- if you know what you are doing fully, you TEST the backups on a recurring basis, you don't mind being down for a bad block -- the old fashioned way works but -- times are changing, there are more and more reasons to use it.

I would also recommend that you do your backup to disk first then send them to tape (of course if you can afford it!)

Good luck!

If you want more about RMAN, please let us know...

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Rory R Hammond
Trusted Contributor

Re: Oracle Startup / Shutdown Script

I restored live backups on several occasions. Without rman. but we do have mirroring.
1. We put oracle in backup mode.
2. then broke the mirrors
3. took oracle out of backup
mode
4. fsck the the mirrors.
5. mount the mirrors in a
different sub directory.
6. backed them up.

Having said the above. RMAN is better. especially if you do not have mirroring.

Rory
There are a 100 ways to do things and 97 of them are right