rman backup script suggestion [message #490408] |
Mon, 24 January 2011 10:46 |
patdev
Messages: 73 Registered: August 2008
|
Member |
|
|
Hi all,
Bellow i have backup script but i want to know how can i run in one script? also, i will be running from the cronjob on linux server!
setenv TNS_ADMIN "/location/network/admin"
setenv ORACLE_HOME "/location/db1"
setenv TWO_TASK "DB1"
setenv ORACLE_SID "DB1"
rman run {
# Shutdown database for backups and put into MOUNT mode
shutdown immediate
startup mount
# Allocate channel. Important: This must be done after
# database has been mounted!!!
allocate channel t1 DEVICE TYPE DISK FORMAT '/backuplocation/DB1RMAN/%U' ;
# Perform full database backup
backup Database format '/backuplocation/DB1RMAN/%d_FULL_%U.bck';
# Open database after backup complete
sql 'alter database open';
backup current controlfile;
sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
release channel t1;
}
|
|
|
|