--backup_db.rman文件 CONFIGURE RETENTION POLICY TO REDUNDANCY = 2; CONFIGURE DEVICE TYPE DISK PARALLELISM 2; CONFIGURE DEFAULT DEVICE TYPE TO DISK; backup filesperset = 5 as compressed backupset database format 'd:/backup/rman/full_%U.rman'; sql 'alter system archive log current'; backup filesperset = 50 as compressed backupset archivelog all format 'd:/backup/rman/arch_%U.rman' delete input; DELETE noprompt OBSOLETE; crosscheck backup; delete noprompt expired backup; backup format 'd:/backup/rman/ctl_%U.rman' current controlfile; backup spfile format 'd:/backup/rman/spfile_%U.rman' ; exit; backup_oracle.bat
文件加入到计划任务即可 删除dg备库归档日志(已经应用)
复制代码 代码如下:
--delete_dg_archivelog.bat rem 注意修改 部署目录 cd D:/win_xifenfei d: rem 注意delete_archive.sql 查询是否有记录
--delete_archive.sql set lines 150 col name for a150 set pagesize 0 feedback off verify off heading off echo off spool delete_archivelog.bat select 'del '||name from v$archived_log where APPLIED='YES' AND NAME IS NOT NULL and DEST_ID=1; spool off exit;