您的位置:首页 > 博客中心 > 数据库 >

Oracle 11gR2 RMAN batch script

时间:2022-03-13 23:27

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

cd /d D:\app\product\11.2.0\dbhome_1\BIN
rman target   catalog   @‘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

 

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

 

热门排行

今日推荐

热门手游