温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

oracle data gurad ORA-16416错误

发布时间:2020-08-09 23:13:56 来源:ITPUB博客 阅读:154 作者:勿忘心安 栏目:关系型数据库

oracle dg 是我自己的测试环境,由于ip被占用,所以导致我自己需要更换ip,变更完ip之后遇见了以下的问题,现在记录一下。

更改完ip以后,我还是做正常的主备切换,由于自己粗心大意,切换之前没有查询主备记得switchover_status,直接进行切换,发现报如下错误:

在主机上进行switchover

oracle data gurad  ORA-16416错误

随机查询了一下一下主备的switchover状态发现:

主:

oracle data gurad  ORA-16416错误

备:

oracle data gurad  ORA-16416错误

中间以为是主库出问题,就将主库重启,后来发现,主备库的监听状态都是未运行的状态:

oracle data gurad  ORA-16416错误

发现host地址是更改前的地址,然后更改host地址,重启监听,重新配置tns文件,重启主库再次查询:

oracle data gurad  ORA-16416错误

显示not allow ed 状态,查看官网文档显示:

NOT ALLOWED - Either this is a standby database and the primary database has not been switched first, or this is a primary database and there are no standby databases. 

    SESSIONS ACTIVE - Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted.


这个原因可能是我在重启主库的时候导致 数据库备库有些日志没有得到应用。在备库执行recover managed

oracle data gurad  ORA-16416错误

再次在主库查询:

oracle data gurad  ORA-16416错误

已经变成 to standby状态了,接下来就可以正常的主备切换了







向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI