Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3548879
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2019-12-27 14:27:30

前提知识:
从12.2 开始,DG环境,主库修改密码后可以自动同步到备库,不需要手工处理(Doc ID 2307365.1 )
12.1 版本,DG环境,主库修改sys密码,需要手工同步( Doc ID 1984091.1 )

但有时候也会遇到问题。

配置好的ADG,过了一段时间,看alert日志不断报错
------------------------------------------------------------
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
------------------------------------------------------------
那么需要重新同步口令文件了?


搭建RAC对RAC DG时需要保持各节点的口令文件一致,在11g中需要把节点1的口令文件复制到节点2,然后传输到RAC DG的两个节点上。在12c中更复杂些,因为口令文件放在了ASM中。

主库上grid:
查看当前的口令文件
srvctl config database -d ORCL|grep Password
  Password file: +DATADG/ORCL/PASSWORD/pwdORCL.291.1026246847 注意看这一行


asmcmd -p
pwget --dbuniquename xxx 应该跟上面的结果一样鸭,12c才有的命令
pwcopy +DATADG/ORCL/PASSWORD/pwdORCL.291.1026246847 /tmp  拷贝出来
exit


scp /tmp/pwdORCL.291.1026246847   root@192.168.1.170:/tmp/pwdORCLDG  传到dg的备库


在备库root:
chown grid:oinstall /tmp/pwdORCLDG


oracle:
srvctl config database -db ORCLDG 最好先看一下当前的口令文件,以便后面确认是否更改了
  +DG1/ORCLDG/password/pwdORCLDG
  
grid:
asmcmd -p
pwcopy /tmp/pwdORCLDG '+DG1/ORCLDG/password/'


srvctl modify database -db ORCLDG -pwfile '+DG1/ORCLDG/password/pwdORCLDG'
这样alert就不再报错了。
如果还报错呢?
那就在备库上先删除口令文件,停止应用归档的进程msp,然后再拷贝一遍。

阅读(2968) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~