oracle data gurad ORA-16416错误

来源:这里教程网 时间:2026-03-03 13:59:42 作者:

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状态了,接下来就可以正常的主备切换了

相关推荐