首页 > 数据库 > Oracle > DataGuard已应用归档日志删除脚本
#!/bin/sh
. /home/oracle/.bash_profile
export ORACLE_SID=hrdg
$ORACLE_HOME/bin/sqlplus -silent "/ as sysdba" <
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 /<
delete noprompt expired archivelog all;
exit;
END
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/19423/viewspace-1059507/ ,如需转载,请注明出处,否则将追究法律责任。