DataGuard已應用歸檔日誌刪除指令碼

sundog315發表於2012-09-27

#!/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

[@more@]Dat

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19423/viewspace-1059507/,如需轉載,請註明出處,否則將追究法律責任。

相關文章