您的位置:首页 > 其它

Broker切换过程中原主库不能自启动

2015-12-25 11:40 218 查看
Oracle 11G 在配置好Data Guard使用Broker进行切换的过程中,出现报错,虽然不影响正常使用,但还是探其究竟,找到问题所在。

在Broker中进行一次切换后

DGMGRL> switchover to primary;

Performing switchover NOW, please wait...

New primary database "primary" is opening...

Operation requires shutdown of instance "king" on database "paris"

Shutting down instance "king"...

ORACLE instance shut down.

Operation requires startup of instance "king" on database "paris"

Starting instance "king"...

Unable to connect to database

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

Warning: You are no longer connected to ORACLE.

Please complete the following steps to finish switchover:

start up instance "king" of database "paris"

切换完成之后,原主库需要手动startup,这种情况应该是可以自动启动的,并且自动应用日志,因为当前Broker Configuraion已经配好并且已经enable;

查询相关文档发现是因为GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain的格式,官方文档也有说明:

如果要启用DGMGRL在切换过程中可以重启实例,必须静态注册到本地监听文件中,格式如下:

To enable DGMGRL to restart instances during the course of broker operations, a service with a specific name must be statically registered with the local listener of each instance. The value for the GLOBAL_DBNAME attribute must be set to a concatenation
of db_unique_name_DGMGRL. db_domain. For example, in the

LISTENER.ORA file:

LISTENER = (DESCRIPTION =

(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)

(PORT=port_num))))

SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=sid_name)

(GLOBAL_DBNAME=db_unique_name_DGMGRL. db_domain)

(ORACLE_HOME=oracle_home)))

重新静态注册过后,再次切换OK

DGMGRL> switchover to standby

Performing switchover NOW, please wait...

New primary database "standby" is opening...

Operation requires shutdown of instance "king" on database "primary"

Shutting down instance "king"...

ORACLE instance shut down.

Operation requires startup of instance "king" on database "primary"

Starting instance "king"...

ORACLE instance started.

Database mounted.

Database opened.

Switchover succeeded, new primary is "standby"

*****如果文件修改之后发现仍不能启动,检查/etc/hosts文件,observer,primary,standby的ip是否都被写进文件中*****
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: