Operating System - HP-UX
1752805 Members
5392 Online
108789 Solutions
New Discussion юеВ

Re: Does RMAN backup prohibit a shutdown immediate command?

 
SOLVED
Go to solution
Morten Kristiansen
Frequent Advisor

Does RMAN backup prohibit a shutdown immediate command?

Hi,

We are running an Oracle 8.1.7.4 database on a HP-UX 11.00 RP-7400.

I'm wondering if a RMAN backup prohibits a shutdown immediate on the database that's being backed up (target)?

I tried to do a shutdown immediate on our database, but the shutdown immediate didn't complete until 2 hours later. The only thing I know was running, was a RMAN backup of the database. The RMAN backup was a full backup with all archivelogs.

regards
Morten K
9 REPLIES 9
Michael Schulte zur Sur
Honored Contributor
Solution

Re: Does RMAN backup prohibit a shutdown immediate command?

Hi,

this should postpone a shutdown until completion. I think you will have to stop the rman backup or do a shutdown abort.

hth,

Michael
Peter Godron
Honored Contributor

Re: Does RMAN backup prohibit a shutdown immediate command?

Morten,
from my Oracle book:
"The database will not close at once - after Oracle performs some cleanup, the database will shut down. The session that were accessing the database are terminated gracefully and any resource in use are methodically freed up.The length of time to complete depends on the number of users on the database.Be patient."

So the short answer is no, RMAN does not prohibit but slows down a shutdown immediate.

Regards
Indira Aramandla
Honored Contributor

Re: Does RMAN backup prohibit a shutdown immediate command?

Hi Morten,

No, RMAN does not prohibit but slows down a shutdown immediate.

Immediate database shutdown proceeds with the following conditions:

Any uncommitted transactions are rolled back. (If long uncommitted transactions exist, this method of shutdown might not complete quickly, despite its name).
Oracle does not wait for users currently connected to the database to disconnect; Oracle implicitly rolls back active transactions and disconnects all connected users.

It depends upon what the sessions are doing. If these are sessions with active, long running queries, it may take a very long time for the session to be terminated by the shutdown. While RMAN backup was runing and you issued a shutdown immediate. The shutdown immediate will be completed after the backup process.


Indira A
Never give up, Keep Trying
Yogeeraj_1
Honored Contributor

Re: Does RMAN backup prohibit a shutdown immediate command?

hi,

Shutdown immediate is a clean shutdown. It simply kicks off active transactions before doing a clean shutdown and leaves the database in the same closed state as shutdown
normal does.

Here, Your RMAN is like a long running transaction a really long running transaction that would take a while to rollback.

As such your shutdown immediate will have to wait for the RMAN to compelete...

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Morten Kristiansen
Frequent Advisor

Re: Does RMAN backup prohibit a shutdown immediate command?

OK, thanks. So it seems that the backup process of RMAN is treated as a long running transaction. Then I can see why the shutdown immediate dosen't complete until the backup is done.
Mel_12
Advisor

Re: Does RMAN backup prohibit a shutdown immediate command?

Waiting 2 hours to accomplish your "Shutdown Immediate" request defeats the purpose intended. Since your db is 8.1.7.4, you can now get away with shutdown abort and don't have to worry about recovery the next time you start your database. This is unofficial documentation but known from experience. Oracle will internally recover for you.

To be safer, stop RMAN next time before attempting to shutdown the db. If there are any defunct processes, also kill them via the OS if necessary.

Regards,
Mel
R. Allan Hicks
Trusted Contributor

Re: Does RMAN backup prohibit a shutdown immediate command?

One of the things to bear in mind when doing hot backups....... RMAN will put each tablespace in backup mode. Shutting down the database in the middle of a back up, could leave a tablespace in backup mode which can have some undesireable side effects.

If you must shutdown during a backup, kill the backup procedure first and check the tablespaces (select * from V$backup) to make sure that RMAN shutdown cleanly. If any are still in backup mode.

alter tablespace end backup;
"Only he who attempts the absurd is capable of achieving the impossible

Re: Does RMAN backup prohibit a shutdown immediate command?

RMAN does NOT put your tablespaces in hot backup mode. It reads the datafile block by block. That is why you can do incremental backups with RMAN. It backs up the blocks that changed since the last 'full' backup.

/M
TwoProc
Honored Contributor

Re: Does RMAN backup prohibit a shutdown immediate command?

Shutdown immediate will shutdown pretty much as you've been infomed above. Shutdown abort will get you there pretty quickly - however, that means that you've probably got some data recovery left to do in the recovery logs that has not been transferred yet to the data blocks that you're backing up. I don't think that RMAN backs up recovery logs - so this might leave you in a lurch. So, assuming that you're after a cold backup of the system (otherwise you don't need to shutdown), just kick off a separate command to run sqlplus and do a shutdown abort, then a normal startup (thus making the system recover and catch up all data from the recovery logs to the data blocks), exit sqlplus, then connect via RMAN and do the shutdown immediate, then do your "startup mount" command to begin your cold backup. This is a bit goofy - but RMAN doesn't like to "connect" to a down target database, so you can't get RMAN connected to your database to get a "startup mount" going to begin your backup. Ugly, but this will work around it. I've seen other work arounds (Oracle 9i RMAN backup and Recovery - from Oracle Press) that involves some "at" commands (a la cron) to make it happen; but I found that the method I've outlined seems much easier.
Also, to note some earlier post - RMAN backup does not put your tablespaces in a backup state like the old style backup method, so you don't have the worry of a failed hot backup leaving your database in a strange state like in the days of yore.
All that being said - this is how we've made it work with DataProtector - but it would seem to me to be the same challenge with other backup products/methods.
We are the people our parents warned us about --Jimmy Buffett