Wednesday, 27 April 2011

shell script/rman backup script

RUN
{
allocate channel c1 type disk format '/backup/pooo/rmanback/RMAN_%d_%u_%s_%p';
backup database include current controlfile;
release channel c1;
allocate channel c1 type disk
     format '/backup/pooo/rmanback/RMAN_%d_%u_%s_%p';
sql "alter system archive log current";
backup archivelog all delete input;
sql "alter database backup controlfile
     to ''/backup/pooo/rmanback/rman_control.rman'' reuse";
release channel c1;
}

above information save for   RMAN_backup.rcv format.. and create .sh file

export ORACLE_HOME=/ora1/pooo/db/tech_st/11.1.0
export ORACLE_SID=pooo
export PATH=$PATH:$ORACLE_HOME/bin

/ora1/pooo/db/tech_st/11.1.0/bin/./rman target /  msglog rman_backup_db_online.log CMDFILE RMAN_backup.rcv <<EOF
exit
EOF

the above information save for backupdb.sh format ... and run the script

#./backupdb.sh






 

1 comment:

  1. how to find out whether the database connect catalog or not??

    ReplyDelete