#!/bin/sh
. /home/oracle/.bash_profile
export ORACLE_SID=hrdg
$ORACLE_HOME/bin/sqlplus -silent "/ as sysdba" < /home/oracle/scripts/deletehrdgarch.sh
set heading off;
set pagesize 0;
set term off;
set feedback off;
set linesize 32767;
select 'rm -rf '||name from v$archived_log where DELETED='NO' and APPLIED='YES';
exit;
EOF
sh /home/oracle/scripts/deletehrdgarch.sh
rman target /<crosscheck archivelog all;
delete noprompt expired archivelog all;
exit;
END
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19423/viewspace-1059507/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/19423/viewspace-1059507/