I have a rman cold backup script.
I cannot use alter database close which I believe internally does a shutdown and a startup mount.
I have tried within the rcv script to do
sql 'shutdown immediate' I get an error invalid sql statement.
Any ideas?
Printable View
I have a rman cold backup script.
I cannot use alter database close which I believe internally does a shutdown and a startup mount.
I have tried within the rcv script to do
sql 'shutdown immediate' I get an error invalid sql statement.
Any ideas?
Here is my RMAN script (9i) - perhaps you can get ideas.
set snapshot controlfile name to '/backupora/wmsp/OFFwmsp1_t20020627.ctl';
run {
shutdown immediate;
startup mount;
allocate channel c1 type disk;
allocate channel c2 type disk;
backup full
filesperset 4
format '/backupora/wmsp/OFFwmsp1_t%T_s%s_p%p'
tag full_offline_20020627
(database);
backup
filesperset 10
format '/backupora/wmsp/OFFarchwmsp1_t%T_s%s_p%p'
tag full_offlineARCH_20020627
(archivelog all);
sql 'alter database open';
release channel c1;
release channel c2; }
=========
Any place above where you see a hard coded date, I dynamically pieced together with a shell script.
SHUTDOWN and STARTUP should be placed outside of run {}
cheers
calvin,
This script has been running 7 days a week 3 times a day for 3 databases (21 times a week) and running fine!
However, I do believe the way it is inside the {} is a 9i feature.