13 October 2013

Cold backup Container database with pluggable databases - open after backup

Hi,
Just a simple script to backup a 12c database, cold, and make sure to open the pluggable databases afterwards.

run {
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP AS COMPRESSED BACKUPSET DATABASE INCLUDE CURRENT CONTROLFILE;
}
ALTER DATABASE OPEN;
ALTER PLUGGABLE DATABASE ALL OPEN;
BACKUP VALIDATE DATABASE;
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED BACKUP;

This will keep your users happy the next morning :-)

No comments:

Post a Comment