风哥教程

培训 . 交流 . 分享
Make progress together!

DG部署过程中的问题

[复制链接]
内容发布:冲鸭!| 发布时间:2021-8-18 13:24:42
测试库部署dgbroker报错:
DGMGRL>  show configuration

Configuration - primary

  Protection Mode: MaxPerformance
  Databases:
    primarydb - Primary database
    standbydb - Physical standby database
      Error: ORA-16810: multiple errors or warnings detected for the database

Fast-Start Failover: DISABLED

Configuration Status:
ERROR

DGMGRL>  show database verbose standbydb

Database - standbydb

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       4 hours 10 minutes 51 seconds (computed 0 seconds ago)
  Apply Rate:      (unknown)
  Real Time Query: OFF
  Instance(s):
    standbydb
      Warning: ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting
解决:
alter system set archive_lag_target=0 scope=spfile;
alter system set log_archive_max_processes=4 scope=spfile;
alter system set log_archive_min_succeed_dest=1 scope=spfile;
alter system set log_archive_trace='0' scope=spfile;
alter system set log_archive_format=%t_%s_%r.dbf scope=spfile;

查看报错
DGMGRL> show database verbose  standbydb

Database - standbydb

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       4 hours 31 minutes 51 seconds (computed 0 seconds ago)
  Apply Rate:      (unknown)
  Real Time Query: OFF
  Instance(s):
    standbydb

  Database Error(s):
    ORA-16766: Redo Apply is stopped
查看日志发现:
Media Recovery Log /app/oracle/archivelog1_42_1056006004.dbf
Errors in file /app/oracle/diag/rdbms/standbydb/standbydb/trace/standbydb_mrp0_3479.trc  (incident=12276):
ORA-00600: internal error code, arguments: [3020], [3], [272], [12583184], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 3, block# 272, file offset is 2228224 bytes)
ORA-10564: tablespace UNDOTBS1
ORA-01110: data file 3: '/app/oracle/oradata/primarydb/undotbs01.dbf'
ORA-10560: block type 'KTU SMU HEADER BLOCK'
Incident details in: /app/oracle/diag/rdbms/standbydb/standbydb/incident/incdir_12276/standbydb_mrp0_3479_i12276.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
MRP0: Background Media Recovery terminated with error 600
Errors in file /app/oracle/diag/rdbms/standbydb/standbydb/trace/standbydb_mrp0_3479.trc:
ORA-00600: internal error code, arguments: [3020], [3], [272], [12583184], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 3, block# 272, file offset is 2228224 bytes)
ORA-10564: tablespace UNDOTBS1
ORA-01110: data file 3: '/app/oracle/oradata/primarydb/undotbs01.dbf'
ORA-10560: block type 'KTU SMU HEADER BLOCK'
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 1095684
解决:由于该库为测试库,且数据量小,可从主库上备份恢复
主库:
RMAN> crosscheck archivelog all;
RMAN> delete noprompt expired archivelog all;  
RMAN> backup database format '/app/csracfull_%U';  
[oracle@primarydb ~]$ scp /app/csracfull_0* 192.168.0.2:/app/
备库在nomount状态下恢复:
[oracle@standbydb ~]$ rman target sys/yuange@primarydb auxiliary  sys/yuange@standbydb

RMAN> duplicate target database for standby;   
报错如下:
RMAN-03002: failure of Duplicate Db command at 11/11/2020 17:24:53
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /app/oracle/oradata/primarydb/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /app/oracle/oradata/primarydb/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /app/oracle/oradata/primarydb/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /app/oracle/oradata/primarydb/system01.dbf conflicts with a file used by the target database
如果在RMAN恢复时不指定 nofilenamecheck 参数,则在数据文件相同文件名恢复时会出现RMAN-05501错误,当主库,备库的数据库文件目录是一样的时候,必须使用 nofilenamecheck参数告诉rman主库和被创建的备份库拥有一样的文件目录和文件名。
RMAN> duplicate target database for standby nofilenamecheck;

库启动后,检查主备状态不正常
SQL> select inst_id,name,open_mode,PROTECTION_MODE,protection_level,DATABASE_ROLE,SWITCHOVER_STATUS from gv$database order by 1;

   INST_ID NAME      OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE        SWITCHOVER_STATUS
---------- --------- -------------------- -------------------- -------------------- -------------------- --------------------
         1 PRIMARYD  READ WRITE           MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PRIMARY              FAILED DESTINATION

查看日志
SQL> SELECT thread#, dest_id, gvad.status, error, fail_sequence FROM gv$archive_dest gvad, gv$instance gvi WHERE gvad.inst_id = gvi.inst_id AND destination is NOT NULL ORDER BY thread#, dest_id;

   THREAD#    DEST_ID STATUS    ERROR                                                             FAIL_SEQUENCE
---------- ---------- --------- ----------------------------------------------------------------- -------------
         1          1 VALID                                                                                   0
         1          2 ERROR     ORA-16058: standby database instance is not mounted                          55
备库已mount,重新激活通道即可
SQL> alter system set log_archive_dest_state_2=defer;
SQL> alter system set log_archive_dest_state_2=enable;

听说发帖有IT币,用之前的记录水一帖赚币下个附件



上一篇:来风哥教育,开启第二人生
下一篇:fsdaaaaaaaaaaaaaaaaaaaaaaa
回复

使用道具 举报

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

本版积分规则

热门文章教程

  • 风哥Oracle数据库巡检工具V1.0(附2.6网页
  • Oracle 12cR2 九大新功能全面曝光_详解云数
  • 实战PHP与MySQL权威指南PDF电子书下载
  • 大数据技术与应用入门培训教程(电子版下载
  • Oracle OCP认证考试IZ0-053题库共712题数据
  • MySQL5权威指南(第3版)PDF电子版下载
快速回复 返回顶部 返回列表