Oracle 11gR2 RMAN batch script

>>>>>>>>> rman_archivelog.bat <<<<<<<<

cd /d D:\app\product\11.2.0\dbhome_1\BIN
rman target sys/oracle@BRSSTBY  catalog rman/rman001@rmandb  @‘F:/delete.rmn‘

>>>>>>>>> execution script: delete.rmn <<<<<<

run{

allocate channel t1 device type disk;
delete noprompt archivelog until time ‘sysdate-1‘;
DELETE FORCE NOPROMPT OBSOLETE;
CROSSCHECK ARCHIVELOG ALL;
DELETE EXPIRED ARCHIVELOG ALL;

release channel t1;
}

 

They have to be separate when done .

 

#!/bin/sh

. /u01/app/oracle/.profile1

${ORACLE_HOME}/bin/rman <<EOF

connect target sys/syspassword@cricprod_prim

connect auxiliary sys/syspassword@cricprod_logstdby

show all;

EOF

 

*********************************************************

http://www.oracle-base.com/articles/misc/oracle-shell-scripting.php

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。