码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 11gR2 RMAN batch script

时间:2014-09-05 10:01:01      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:style   http   os   io   ar   for   art   sp   log   

>>>>>>>>> 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

 

Oracle 11gR2 RMAN batch script

标签:style   http   os   io   ar   for   art   sp   log   

原文地址:http://www.cnblogs.com/jefflu2012/p/3957269.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!