Error is 16047 - 11g物理standby不能apply log问题

同一个Server上建立primary 及standby,  建立时的sid 分别为 test11g,  teststby  .  使用RMAN duplicate 建立物理standby .


primary db 参数如下:

*.log_archive_config='DG_CONFIG=(test11g,teststby)'
*.db_name='test11g'  
*.db_unique_name='test11g'  
*.log_archive_dest_1='location=/data/test11g/arch valid_for=(all_logfiles,all_roles)  db_unique_name=test11g'
*.log_archive_dest_2='service=standby valid_for=(online_logfiles,primary_role) db_unique_name=teststby'
*.log_archive_dest_state_1='enable'   
*.log_archive_dest_state_2='enable'   

*.fal_server=standby
*.fal_client=primary
*.standby_file_management=auto

*.db_file_name_convert='/data/test11g/','/data/teststby/'
*.log_file_name_convert='/data/test11g/','/data/teststby/'





Standby DB上参数设置如下:

*.db_name='test11g'
*.db_unique_name='teststby'   
*.log_archive_dest_1='location=/data/teststby/arch  valid_for=(all_logfiles,all_roles) db_unique_name=teststby'
*.log_archive_dest_2='service=primary valid_for=(online_logfiles,primary_role) db_unique_name=test11g'   

*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'   
*.log_archive_min_succeed_dest=1   
*.standby_file_management='AUTO'  

*.fal_server='primary'      
*.fal_client='standby'      

*.db_file_name_convert='/data/teststby/','/data/test11g/'
*.log_file_name_convert='/data/teststby/','/data/test11g/'





在STANDBY上执行
SQL> alter database recover managed standby database disconnect from session ;
在production 上的alert log如下:   

可能是密码文件问题 。  



Trace file /u01/product/diag/rdbms/test11g/test11g/trace/test11g_arc1_31837.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
ORACLE_HOME = /u01/product/oracle
System name:    Linux
Node name:      dbtest
Release:        2.6.18-164.el5
Version:        #1 SMP Tue Aug 18 15:51:48 EDT 2009
Machine:        x86_64
Instance name: test11g
Redo thread mounted by this instance: 1
Oracle process number: 21
Unix process pid: 31837, image: [email=oracle@dbtest]oracle@dbtest[/email] (ARC1)

*** 2010-09-01 17:27:06.821
*** SESSION ID 2.gif772.1) 2010-09-01 17:27:06.821
*** CLIENT ID 2.gif) 2010-09-01 17:27:06.821
*** SERVICE NAME 2.gif) 2010-09-01 17:27:06.821
*** MODULE NAME 2.gif) 2010-09-01 17:27:06.821
*** ACTION NAME 2.gif) 2010-09-01 17:27:06.821
Redo shipping client performing standby login
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
*** 2010-09-01 17:27:07.030
OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
*** 2010-09-01 17:27:07.031 4132 krsh.c
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
------------------------------------------------------------
*** 2010-09-01 17:27:07.031 869 krsu.c
Error 16191 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
Error 16191 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
ORA-16191: Primary log shipping client not logged on standby
*** 2010-09-01 17:27:07.032 4132 krsh.c
PING[ARC1]: Heartbeat failed to connect to standby 'standby'. Error is 16191.
*** 2010-09-01 17:27:07.032 2747 krsi.c
krsi_dst_fail: dest:2 err:16191 force:0 blast:1
*** 2010-09-01 17:27:07.310 2046 krse.c
Archived Log entry 53 added for thread 1 sequence 122 ID 0x3470a2d7 dest 1: /data/test11g/arch/1_122_727875351.dbf
*** 2010-09-01 17:27:09.325
FAL[server]: Selected inactive destination; resetting temporarily
Redo shipping client performing standby login
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
*** 2010-09-01 17:27:09.415 4132 krsh.c
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
*** 2010-09-01 17:27:09.416 869 krsu.c
Error 16191 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
Error 16191 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
ORA-16191: Primary log shipping client not logged on standby
*** 2010-09-01 17:27:09.416 2747 krsi.c
krsi_dst_fail: dest:2 err:16191 force:0 blast:1
kcrrwkx: unknown error:16191
ORA-16055: FAL request rejected
*** 2010-09-01 17:33:06.755
Redo shipping client performing standby login
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
OCISessionBegin failed -1
OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
*** 2010-09-01 17:33:06.846 4132 krsh.c
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
*** 2010-09-01 17:33:06.846 869 krsu.c
Error 16191 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
Error 16191 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
ORA-16191: Primary log shipping client not logged on standby
*** 2010-09-01 17:33:06.847 4132 krsh.c
PING[ARC1]: Heartbeat failed to connect to standby 'standby'. Error is 16191.
*** 2010-09-01 17:33:06.847 2747 krsi.c
krsi_dst_fail: dest:2 err:16191 force:0 blast:1
                           


没有办法, 使用如下命令重新设置密码文件,并重新启动primary 及standby  .  

orapwd  file=orapwtest11g  password=sys  ignorecase=y
orapwd  file=orapwteststby  password=sys  ignorecase=y






结果primary db 上仍然报错  :

Starting background process CJQ0
Wed Sep 01 17:46:18 2010
CJQ0 started with pid=26, OS id=849
Wed Sep 01 17:46:37 2010
FAL[server]: DGID from FAL client not in Data Guard configuration
Wed Sep 01 17:49:08 2010
Thread 1 cannot allocate new log, sequence 126
Private strand flush not complete
  Current log# 2 seq# 125 mem# 0: /data/test11g/redo02.log
Thread 1 advanced to log sequence 126 (LGWR switch)
  Current log# 3 seq# 126 mem# 0: /data/test11g/redo03.log
Wed Sep 01 17:49:08 2010
Archived Log entry 56 added for thread 1 sequence 125 ID 0x3470a2d7 dest 1:
Wed Sep 01 17:52:16 2010
Errors in file /u01/product/diag/rdbms/test11g/test11g/trace/test11g_arc2_829.trc:
ORA-16047: DGID mismatch between destination setting and target database
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 16047.
Wed Sep 01 17:56:17 2010
Starting background process SMCO
Wed Sep 01 17:56:17 2010
SMCO started with pid=36, OS id=1882
Wed Sep 01 17:58:17 2010
Errors in file /u01/product/diag/rdbms/test11g/test11g/trace/test11g_arc2_829.trc:
ORA-16047: DGID mismatch between destination setting and target database
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 16047.
Wed Sep 01 18:04:17 2010
Errors in file /u01/product/diag/rdbms/test11g/test11g/trace/test11g_arc2_829.trc:
ORA-16047: DGID mismatch between destination setting and target database
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 16047.
                                                                                          




primary db 的 Trace 文件:  


Trace file /u01/product/diag/rdbms/test11g/test11g/trace/test11g_arc2_829.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
ORACLE_HOME = /u01/product/oracle
System name:    Linux
Node name:      dbtest
Release:        2.6.18-164.el5
Version:        #1 SMP Tue Aug 18 15:51:48 EDT 2009
Machine:        x86_64
Instance name: test11g
Redo thread mounted by this instance: 1
Oracle process number: 22
Unix process pid: 829, image: [email=oracle@dbtest]oracle@dbtest[/email] (ARC2)

*** 2010-09-01 17:46:16.854
*** SESSION ID 2.gif10.1) 2010-09-01 17:46:16.854
*** CLIENT ID 2.gif) 2010-09-01 17:46:16.854
*** SERVICE NAME 2.gif) 2010-09-01 17:46:16.854
*** MODULE NAME 2.gif) 2010-09-01 17:46:16.854
*** ACTION NAME 2.gif) 2010-09-01 17:46:16.854
Redo shipping client performing standby login
OCIServerAttach failed -1
.. Detailed OCI error val is 12514 and errmsg is 'ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12514 and errmsg is 'ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
'
OCIServerAttach failed -1
.. Detailed OCI error val is 12514 and errmsg is 'ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
'
*** 2010-09-01 17:46:16.864 4132 krsh.c
Error 12514 received logging on to the standby
*** 2010-09-01 17:46:16.865 869 krsu.c
Error 12514 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
Error 12514 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
*** 2010-09-01 17:46:16.865 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 12514.
*** 2010-09-01 17:46:16.865 2747 krsi.c
krsi_dst_fail: dest:2 err:12514 force:0 blast:1
*** 2010-09-01 17:46:16.950 2046 krse.c
Archived Log entry 54 added for thread 1 sequence 123 ID 0x3470a2d7 dest 1: /data/test11g/arch/1_123_727875351.dbf
*** 2010-09-01 17:52:16.892
Redo shipping client performing standby login
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
*** 2010-09-01 17:52:16.983 4539 krsu.c
Logged on to standby successfully
Client logon and security negotiation successful!
Error 16047 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'standby'
ORA-16047: DGID mismatch between destination setting and target database
*** 2010-09-01 17:52:16.998 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'standby'. Error is 16047.
*** 2010-09-01 17:52:16.998 2747 krsi.c
krsi_dst_fail: dest:2 err:16047 force:0 blast:1






Standby上的alert log  :



Wed Sep 01 17:46:37 2010
Successful mount of redo thread 1, with mount id 880479672
Physical Standby Database mounted.
Lost write protection disabled
Wed Sep 01 17:46:37 2010
ARC1 started with pid=21, OS id=928
Wed Sep 01 17:46:37 2010
ARC2 started with pid=22, OS id=930
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
Wed Sep 01 17:46:37 2010
ARC3 started with pid=23, OS id=932
Completed: alter database mount standby database
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Wed Sep 01 17:46:45 2010
alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (teststby)
Wed Sep 01 17:46:45 2010
MRP0 started with pid=24, OS id=941
MRP0: Background Managed Standby Recovery process started (teststby)
started logmerger process
Wed Sep 01 17:46:50 2010
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 2 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 108
Completed: alter database recover managed standby database disconnect from session
Wed Sep 01 17:52:16 2010
Using STANDBY_ARCHIVE_DEST parameter default value as /data/teststby/arch
RFS[1]: Assigned to RFS process 1594
RFS[1]: Identified database type as 'physical standby': Client is ARCH pid 829
Wed Sep 01 17:58:17 2010
RFS[2]: Assigned to RFS process 1982
RFS[2]: Identified database type as 'physical standby': Client is ARCH pid 829
Wed Sep 01 18:01:23 2010
db_recovery_file_dest_size of 4977 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.
Wed Sep 01 18:04:17 2010
RFS[3]: Assigned to RFS process 2441
RFS[3]: Identified database type as 'physical standby': Client is ARCH pid 829




难道还是密码文件问题  ??

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-672374/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-672374/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值