请问一下DataGuard的rman备份archive log file问题

[复制链接]
查看11 | 回复9 | 2008-2-13 12:43:03 | 显示全部楼层 |阅读模式
DB : 11gr2dataguard : maximum performance / physical dataguard standby db mode : read only with apply 因为primary db在备份archive log file时会因为standby db还没有appliedarchive log file而出现警告讯习RMAN-08120: WARNING: archived log not deleted, not yetapplied by standby 我试过先在执行rman script之前先等待几分钟后再执行,但还是很容易遇到这警告讯习,而导致常收到告警mail和在OEM里 Last Backup项目看到警告有什较好的解决方案吗?

回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
其实归档没有必要DELETE INPUT,可以多保留一段时间,通过操作系统命令find /home/oracle/archive -ctime +7 -exec rm {} \;
来删除,然后备份前
使用
crosscheck archivelog all;
delete noprompt expired archivelog all;
就好了。
你报这个错可能是网络不太好,或者可以采用ASYN LGWR的方式,可能你使用的ARCHIVE 进程进行传输,这样只有在归档生成后才能传输。
而私用ASYN LGWR可以通过LSN在redo entries写入LOGFILE的后进行传输。
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY.
Archive Log Management Improvements
This feature provides the following enhancements:
Ensure that archive logs are deleted only when not needed by required components (for example, Data Guard, Streams, and Flashback).
In a Data Guard environment, allow all standby destinations to be considered where logs are applied (instead of just mandatory destinations), before marking archive logs to be deleted. This configuration is specified using CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY.
Allow optional archive log destination to be utilized in the event that the flash recovery area is inaccessible during backup. Archive logs in this optional destination can be deleted using BACKUP .. DELETE INPUT or DELETE ARCHIVELOG.
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
本帖最后由 guoq.lee 于 2014-9-11 10:10 编辑
apply是实时的吗,using current logfile。如果是,应该就不会出现这个问题。
我也觉得这个东西很不好。
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
很明显归档日志没有删除,是不是空间的问题
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY.这貌似是个好方法
呵呵

LGWR ASYN 实时apply 在11G中更加有用,用于只读数据库。我们就这样用
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
1.CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
我有已有配置过,还是没办法
2.log_archive_Dest_2设定
SERVICE=sdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=sdb
Standby db 有配置standb redo log
3.我知道原因是standbydb还没有apply 从primary db送到的archive log file,而造成primary db 进行自动删除archive log file造成警告。
然后2台主机是同一个机房,不会有网络的问题
有兴趣测试的朋友可以连续switch log file后立即执行archive log file的备份,很容易出现跟我相同的问题

回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
测试如下:
在日志没有传送到备库时
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
SQL> select sequence#,applied from v$archived_log order by 1 desc ;
SEQUENCE# APPLIED
---------- ---------

51 NO

50 NO

49 NO

48 NO

47 NO

46 NO

45 NO

44 NO

43 NO

42 NO

41 YES
在主库上删除归档日志
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Fri Sep 12 03:21:52 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.All rights reserved.
connected to target database: ORCL (DBID=1382102121)
RMAN> delete noprompt archivelog all;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=51 device type=DISK
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_52.arc thread=1 sequence=52
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_53.arc thread=1 sequence=53
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_54.arc thread=1 sequence=54
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_55.arc thread=1 sequence=55
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_56.arc thread=1 sequence=56
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_57.arc thread=1 sequence=57
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_58.arc thread=1 sequence=58
监听起起来,日志传输过去
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select sequence#,applied from v$archived_log order by 1 desc ;
SEQUENCE# APPLIED
---------- ---------

59 NO

58 NO

57 NO

56 NO

55 NO

54 NO

53 NO

52 NO

51 NO

50 NO

49 NO
备置
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/OraDb11g_home1/dbs/snapcf_orcl.f'; # default
删除归档日志
RMAN> delete noprompt archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=46 device type=DISK
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_52.arc thread=1 sequence=52
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_53.arc thread=1 sequence=53
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_54.arc thread=1 sequence=54
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_55.arc thread=1 sequence=55
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_56.arc thread=1 sequence=56
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_57.arc thread=1 sequence=57
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_58.arc thread=1 sequence=58
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/u01/app/archivelog/arch_854332222_1_59.arc thread=1 sequence=59

重置删除策略
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY clear;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
RMAN configuration parameters are successfully reset to default value
RMAN> delete noprompt archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
107 152A 11-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_52.arc
108 153A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_53.arc
109 154A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_54.arc
110 155A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_55.arc
111 156A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_56.arc
112 157A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_57.arc
113 158A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_58.arc
119 159A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_59.arc
124 160A 12-SEP-14
Name: /u01/app/archivelog/arch_854332222_1_60.arc
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_52.arc RECID=107 STAMP=858048409
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_53.arc RECID=108 STAMP=858048409
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_54.arc RECID=109 STAMP=858048470
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_55.arc RECID=110 STAMP=858049000
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_56.arc RECID=111 STAMP=858049071
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_57.arc RECID=112 STAMP=858049141
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_58.arc RECID=113 STAMP=858050501
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_59.arc RECID=119 STAMP=858050931
deleted archived log
archived log file name=/u01/app/archivelog/arch_854332222_1_60.arc RECID=124 STAMP=858051230
Deleted 9 objects

RMAN>


回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
回复

使用道具 举报

千问 | 2008-2-13 12:43:03 | 显示全部楼层
dataguard : maximum performance / physical dataguard
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行