最近比较,一直被上头追,查数据,迁移数据,同步数据。。。
一大推事情
今天又帮重庆的公司安装11.2.0.1的db 并配置physical standby
网络真够慢的 。。。一直卡着不动 火气很大很大。。
尤其在配置physical standby的时候,一大堆的错误
首先是
Errors in file d:\oracle\diag\rdbms\scqasrs\scqasrs\trace\scqasrs_arc1_3456.trc:
ORA-01031: ??
PING[ARC1]: Heartbeat failed to connect to standby 'ASRSBK'. Error is 1031.
查看trc文件:发现很多TNS ASRSBK 不可识别。。
猜想是不是standby listener文件出错了
原来
(SID_DESC =
(GLOBAL_DBNAME = SCQASRS)
(ORACLEKHOME = D:\oracle\product\11.2.0\dbhome_1)
(SID_NAME = ASRSBK)
修改为:
最近比较,一直被上头追,查数据,迁移数据,同步数据。。。
一大推事情
今天又帮重庆的公司安装11.2.0.1的db 并配置physical standby
网络真够慢的 。。。一直卡着不动 火气很大很大。。
尤其在配置physical standby的时候,一大堆的错误
首先是
Errors in file d:\oracle\diag\rdbms\scqasrs\scqasrs\trace\scqasrs_arc1_3456.trc:
ORA-01031: ??
PING[ARC1]: Heartbeat failed to connect to standby 'ASRSBK'. Error is 1031.
查看trc文件:发现很多TNS ASRSBK 不可识别。。
猜想是不是standby listener文件出错了
原来
(SID_DESC =
(GLOBAL_DBNAME = ASRSBK)
(ORACLEKHOME = D:\oracle\product\11.2.0\dbhome_1)
(SID_NAME = ASRSBK)
重启standby中lsnrctl
再次还是出现ora-1031
ORA-01031: insufficient privileges
PING[ARCp]: Heartbeat failed to connect to standby 'ASRSBK'. Error is 1031.
怀疑是口令文件的不同,于是重建主库的口令文件,并将主库的口令文件拷贝到standby 中,然后修改名字(正规做法)
口令文件创建好之后,
查看log,发现报ora-16191
ORA-16191: Primary log shipping client not logged on standby
PING[ARC1]: Heartbeat failed to connect to standby 'standby'. Error is 16191.
因为dataguard的数据传输方式有两种:LGWR和ARCH。其中前者传送的是联机日志的redo,后者传输的是归档
简单总结:
1、ARCH方式传送日志时,如果主备库密码文件不一致,在重新设置密码文件后,必须重启主库才能使日志传送恢复正常。
2、LGWR方式传送日志时,如果主备库密码文件不一致,在重新设置密码文件后,只需可以重启主库或重启备库就可使日志传送恢复正常。
因此将log_archived_dest_2中的ASNY参数改为LGWR ALSNY (当然也可以重启primary db)
修改结束之后,ora-16191错误没了,但是接下来得就是ora-16032
032, 00000, "parameter %s destination string cannot be translated"
// *Cause: The value for the specified parameter contained a destination
// string that could not be translated.
// *Action: Use a valid destination string in the specified parameter.
Errors in file /oracle/admin/db1/bdump/db1_arc0_90394.trc:ITPUB个人空间8r+d(U d.A7T
ORA-16032: parameter destination string cannot be translated
!Gi)~(DL8V*S%PB24849178FAL[server, ARC0]: Error 16032 creating remote archivelog file 'ASRSBK'
检查trc文件,发现:
** 2012-04-25 22:47:58.539 4539 krsu.c
Logged on to standby successfully
Client logon and security negotiation successful!
Standby parameter STANDBY_ARCHIVE_DEST string is invalid at host 'ASRSBK'
Error 16032 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'ASRSBK'
ORA-16032: ?k???? ?r
*** 2012-04-25 22:47:58.554 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'ASRSBK'. Error is 16032.
*** 2012-04-25 22:47:58.554 2747 krsi.c
krsi_dst_fail: dest:2 err:16032 force:0 blast:1
edo shipping client performing standby login
*** 2012-04-25 22:53:08.226 4539 krsu.c
Logged on to standby successfully
Client logon and security negotiation successful!
Standby parameter STANDBY_ARCHIVE_DEST string is invalid at host 'ASRSBK'
Error 16032 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'ASRSBK'
ORA-16032: 无法转换参数的目标字符串
*** 2012-04-25 22:53:08.241 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'ASRSBK'. Error is 16032.
*** 2012-04-25 22:53:08.241 2747 krsi.c
krsi_dst_fail: dest:2 err:16032 force:0 blast:1
!O$\!d y&k Y0L24849178查看standby pfile文件参数
原来.standby_archive_dest='d:\oradata\archive\ASRSBKL\'
改目录不存在
应修改为:standby_archive_dest='d:\archive\ASRSBKL\'
当然ora-16032错误还可能有其他的原因造成的,我们应该根据自己的案例进行分析,而不是盲目的查找答案
这是创建physicalstandby的问题没能得到及时的解决,主要还是自己没有好好定位错误的根源,仅仅通过log文件去分析,而没有继续查看相对应的trc文件
以后碰到问题应该将log同trc结合起来观察,定位出问题的原因 再去查找相关文档。。。。
仅仅希望记录这次的操作过程来给自己能够更好的分析问题。。。。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24849178/viewspace-722248/ ,如需转载,请注明出处,否则将追究法律责任。