求教oracle dataguard 主备库日志无法同步的问题

问题描述

求教oracle dataguard 主备库日志无法同步的问题

现在做data guard 测试,试了很多次,主库的日志一直 无法同步到备份库。求高手解答。
测试环境

主库::操作系统 redhat 5.8 地址 192.168.1.135 数据库版本 oracle 10.2.0
备库: 操作系统 redhat 5.8 地址 192.168.1.3 数据库版本 oracle 10.2.0

主库参数文件

orcl.__db_cache_size=390070272
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=155189248
orcl.__streams_pool_size=0
*.audit_file_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/adump'
*.background_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/app/oracle/product/10.2.0/db_1/oradata/orcl/control01.ctl','/app/oracle/product/10.2.0/db_1/oradata/orcl/control02.ctl','/app/oracle/product/10.2.0/db_1/oradata/orcl/control03.ctl'
*.core_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='STDDB','PRIDB'
*.db_name='orcl'
*.db_unique_name='PRIDB'
*.db_recovery_file_dest='/app/oracle/product/10.2.0/db_1/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='DB_PRIDB'
*.fal_server='DB_STDDB'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(PRIDB,STDDB)'
*.log_archive_dest_1='LOCATION=/app/oracle/product/10.2.0/db_1/oradata/archivelog_orcl VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIDB'
*.log_archive_dest_2='SERVICE=DB_STDDB LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STDDB'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.dbf'
*.log_archive_max_processes=5
*.log_file_name_convert='STDDB','PRIDB'
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.pga_aggregate_target=186646528
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=559939584
*.standby_archive_dest='LOCATION=/app/oracle/product/10.2.0/db_1/oradata/archivelog_orcl'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/udump'

备库参数文件
orcl.__db_cache_size=390070272
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=155189248
orcl.__streams_pool_size=0
*.audit_file_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/adump'
*.background_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/app/oracle/product/10.2.0/db_1/oradata/orcl/control01.ctl','/app/oracle/product/10.2.0/db_1/oradata/orcl/control02.ctl','/app/oracle/product/10.2.0/db_1/oradata/orcl/control03.ctl'
*.core_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='PRIDB','STDDB'
*.db_name='orcl'
*.db_recovery_file_dest='/app/oracle/product/10.2.0/db_1/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.db_unique_name='STDDB'
*.fal_client='db_stddb'
*.fal_server='db_pridb'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(STDDB,PRIDB)'
*.log_archive_dest_1='LOCATION=/app/oracle/product/10.2.0/db_1/oradata/archivelog_orcl VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=STDDB'
*.log_archive_dest_2='SERVICE=db_pridb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRIDB'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.dbf'
*.log_archive_max_processes=5
*.log_file_name_convert='PRIDB','STDDB'
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.pga_aggregate_target=186646528
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=559939584
*.standby_archive_dest='LOCATION=/app/oracle/product/10.2.0/db_1/oradata/archivelog_orcl'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/app/oracle/product/10.2.0/db_1/admin/orcl/udump'

主库ntsname文件
DB_PRIDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.135)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

DB_STDDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

备库tnsnames文件
DB_PRIDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.135)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

DB_STDDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

主库alert.log文件
Error 12514 received logging on to the standby
Fri Oct 23 15:05:03 2015
Errors in file /app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_arc4_5182.trc:
ORA-12514: Message 12514 not found; No message file for product=RDBMS, facility=ORA
PING[ARC4]: Heartbeat failed to connect to standby 'DB_STDDB'. Error is 12514.
Fri Oct 23 15:10:03 2015
Error 12514 received logging on to the standby
Fri Oct 23 15:10:03 2015
Errors in file /app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_arc4_5182.trc:
ORA-12514: Message 12514 not found; No message file for product=RDBMS, facility=ORA
PING[ARC4]: Heartbeat failed to connect to standby 'DB_STDDB'. Error is 12514.
Fri Oct 23 15:15:03 2015
Error 12514 received logging on to the standby
Fri Oct 23 15:15:03 2015
Errors in file /app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_arc4_5182.trc:
ORA-12514: Message 12514 not found; No message file for product=RDBMS, facility=ORA
PING[ARC4]: Heartbeat failed to connect to standby 'DB_STDDB'. Error is 12514.
Fri Oct 23 15:20:03 2015
Error 12514 received logging on to the standby
Fri Oct 23 15:20:03 2015
Errors in file /app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_arc4_5182.trc:
ORA-12514: Message 12514 not found; No message file for product=RDBMS, facility=ORA
PING[ARC4]: Heartbeat failed to connect to standby 'DB_STDDB'. Error is 12514.
Fri Oct 23 15:25:03 2015
Error 12514 received logging on to the standby
Fri Oct 23 15:25:03 2015
Errors in file /app/oracle/product/10.2.0/db_1/admin/orcl/bdump/orcl_arc4_5182.trc:
ORA-12514: Message 12514 not found; No message file for product=RDBMS, facility=ORA
PING[ARC4]: Heartbeat failed to connect to standby 'DB_STDDB'. Error is 12514.
Fri Oct 23 15:25:40 2015
Thread 1 advanced to log sequence 6
Current log# 2 seq# 6 mem# 0: /app/oracle/product/10.2.0/db_1/oradata/orcl/redo02.log

备库alert.log 文件
ARCH: STARTING ARCH PROCESSES
ARC0 started with pid=16, OS id=8947
ARC1 started with pid=17, OS id=8949
ARC2 started with pid=18, OS id=8951
ARC3 started with pid=19, OS id=8953
Fri Oct 23 14:41:41 2015
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC4: Archival started
ARCH: STARTING ARCH PROCESSES COMPLETE
Fri Oct 23 14:41:41 2015
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC1: Thread not mounted
Fri Oct 23 14:41:41 2015
ARC3: Becoming the heartbeat ARCH
ARC3: Thread not mounted
Fri Oct 23 14:41:41 2015
ARC0: Thread not mounted
ARC4 started with pid=20, OS id=8955
ARC4: Thread not mounted
Fri Oct 23 14:41:41 2015
ARC2: Thread not mounted
Fri Oct 23 14:41:41 2015
Successful mount of redo thread 1, with mount id 1421667489
Fri Oct 23 14:41:41 2015
Physical Standby Database mounted.
Completed: alter database mount standby database
Fri Oct 23 14:42:21 2015
alter database recover managed standby database disconnect from session
Fri Oct 23 14:42:21 2015
Attempt to start background Managed Standby Recovery process (orcl)
MRP0 started with pid=21, OS id=8958
Fri Oct 23 14:42:21 2015
MRP0: Background Managed Standby Recovery process started (orcl)
Managed Standby Recovery not using Real Time Apply
Media Recovery Waiting for thread 1 sequence 3
Fri Oct 23 14:42:27 2015
Completed: alter database recover managed standby database disconnect from session
Fri Oct 23 14:56:30 2015
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.

解决方案

物理dataguard日志无法应用问题

时间: 2024-11-02 11:56:43

求教oracle dataguard 主备库日志无法同步的问题的相关文章

Oracle 11g DataGuard 物理备库配置及Active DataGuard测试

说明: 本文安装配置了Oracle 11g Dataguard 物理备库,并测试了11g Dataguard 物理备库新特性Active Data Guard, 是Oracle Database Enterprise Edition的一个功能,需要额外授权,本文只用于测试. 一.环境介绍 1. 主数据库环境 操作系统版本: OEL5.8 x64 数据库版本  : Oracle 11.2.0.3 x64 数据库sid名 : orcl 2. 备库环境 操作系统版本: OEL5.8 x64 数据库版本

Oracle 11g Dataguard物理备库配置(六) broker fastfailover测试

本文采用Oracle 11g Dataguard broker fastfailover测试 Oracle 11g Dataguard fast failover配置,需要主备数据库开启闪回功能,闪回功能开启本文略过. 闪回开启需要启动到mount状态时,主备库的监听不要随意关闭. 1. dgmgrl查看主备库状态 $ dgmgrl sys/oracle DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production Copyright (c) 2

Oracle 11g Dataguard物理备库配置(五) broker switchover测试

本文采用Oracle 11g Dataguard broker switchover测试 1. 采用dataguard broker 测试switchover 1) 主库情况 SQL> select open_mode,database_role,db_unique_name from v$database; OPEN_MODE            DATABASE_ROLE    DB_UNIQUE_NAME -------------------- ---------------- ---

Oracle 11g Dataguard物理备库配置(一) Duplicate配置

Oracle 11g Dataguard Duplicate物理备库配置(一)之物理备库创建配置 # ver:1.5 第五次修改 # modify: 2013.8.16 # author: koumm 说明: 本文安装配置了Oracle 11g Dataguard通过duplicate方式创建物理备库. 比起上次配置有以下不同点: 1. 主备库目录结构不同. 2. 采用duplicate方式创建物理备库. 一.环境介绍 1. 主数据库环境 操作系统版本  : OEL5.8 x64 数据库版本  

Oracle中DG备库报错ORA-00313、00312、27037

DATAGUARD配置如下: PROD为主库,SBDB为备库 日志组1-3组为redolog file,4-6组为standby log 在创建standby log后主库关库,使用冷备tar包将数据传输到备库进行的恢复. DG配置完成之后,启动备库之后,备库alert日志报错如下: Errors in file /u01/app/oracle/admin/SBDB/udump/sbdb_rfs_14903.trc: ORA-00313: open failed for members of l

MySQL复制(2) 主备库都为空的情况下创建主备复制

本文适用于新安装的主库和备库,假定主备库为空,如果你是从已存在的主库复制,请转到<[MySQL] 复制(3)- 创建主备复制(从另一个服务器开始复制)> 主库的配置 主库需要打开二进制日志,并制定一个唯一的server id,my.cnf文件中增加或修改如下内容: server_id=60 log-bin = /data/mysql/log/mysql-bin 备库的配置 备库my.cnf的配置如下: server_id=61 read_only=1 log_bin = /data/mysql

通过shell脚本添加备库日志

今天下午的时候,准备顺手写一个简单的脚本,但是发现很多事情较真起来真是寸步难行.在写脚本的过程中碰到了太多的问题,很多时候感觉像要实现的功能更通用,就得做更多的检查,更多的校验也就意味着有更多的预先条件,这些条件里面有些是规范和建议,有些是按照已有的配置情况,尽管如此,自己感觉还是缺少了太多的检查. 先来说说今天尝试的简单脚本,就是给主库添加standby logfile,这个需求听起来非常简单,都甚至在我的半自动化脚本中隐去了,但是把这个需求要落到纸面上来,简直了. 首先这个需求会涉及到下面的

Oracle 11g Dataguard物理备库配置(四) broker snapshot standby测试

Oracle 11g Dataguard Snapshot Standby数据库功能,可将备库置于打开读写状态,进行模拟生产环境主库中测试.当备库Snapshot standby任务完成后,可以切换回物理备库角色.在Snapshot Standby数据库状态下,备库是可以接受主库传过来的日志,但是不能够将变化应用在备库中. 本文采用Oracle 11g Dataguard broker snapshot standby配置 1. 采用dg broker配置snapshot standby配置 1

Oracle 11g Dataguard物理备库配置(三) Dataguard broker配置

1. 主库broker配置 1) 查询switchover状态 SQL> select database_role,switchover_status from v$database; DATABASE_ROLE    SWITCHOVER_STATUS ---------------- -------------------- PRIMARY          TO STANDBY 2) 查询dg_broker_start参数 SQL> show parameter dg_broker_st