ITPub博客

首页 > 数据库 > Oracle > oracle data gurad ORA-16416错误

oracle data gurad ORA-16416错误

原创 Oracle 作者:勿忘心安 时间:2019-07-09 11:20:09 0 删除 编辑

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

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

在主机上进行switchover

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

主:

备:

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

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

显示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

再次在主库查询:

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







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

下一篇: ORA-01153
请登录后发表评论 登录
全部评论

注册时间:2019-03-04

  • 博文量
    9
  • 访问量
    39054