今天在查询一个备库的状态,才发现虽然平时在查库的时候都会用到:
1. v$instance
2. v$database

但是其中,关于role的列其实说的不是一回事。

比如在一个备库上,你查询v$instance,是这样的结果:

看到【instance_role】居然是Primary,有木有很紧张?

再看看v$database的结果:

可以看到,其实数据库还是备库,没有问题。

关于v$instance的instance_role,官方的说明是这样的:

Describes whether the instance is an active instance (PRIMARY_INSTANCE) or an inactive secondary instance (SECONDARY_INSTANCE), or UNKNOWN if the instance has been started but not mounted

———————————————
Done。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装