GIMR (Management Database) Registers Into Same Service that the Database Instance also registers On

来源:互联网 发布:知乎用户数据分析 编辑:程序博客网 时间:2024/05/16 08:26

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

SYMPTOMS

On 12.1.0.2, GIMR (mgmtdb) database created by default during GI installation. The GI installation had been done using infradb as cluster name. Later on on the top of this cluster a RAC database called INFRADB was created.
On the node that GIMR database is running it is dynamically registered into listener under same service as database instance (see below).
It causes time to time connection issue because the client is redirected to pluggable GIMR database instead of RAC db instance. The corresponding output from lsnrctl status command on affected db node is below:

From "lsnrctl service listener "output:

Service "infradb" has 2 instance(s).
 Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
 Instance "INFRADB1", status READY, has 1 handler(s) for this service...

On the second node of the cluster (mgmtdb is not running on this node), note that the same output does not:

Service "INFRADB" has 1 instance(s).
 Instance "INFRADB2", status READY, has 1 handler(s) for this service...

If the mgmtdb is relocated to node 2, then mgmtdb is registers to the ONFRADB service on node 2 and not on node 1 as expected.



CAUSE

MGMTDB registers with default service which is same as the cluster name.  If the database name is same as the cluster name,  MGMTDB registered to the service that is database name because it is same as the cluster name.
 
Alert.log for the MGMTDB shows that it created internal service infradb at open. The infradb is the cluster name as well as the database name.

alert_-MGMTDB.log:

Tue May 05 14:32:54 2015
Starting ORACLE instance (normal) (OS id: 1291)
......
Tue May 05 14:33:52 2015
****************************************************************
Pluggable Database INFRADB with pdb id - 3 is created as UNUSABLE.
If any errors are encountered before the pdb is marked as NEW,
then the pdb must be dropped
****************************************************************
......

Successfully created internal service infradb at open
 

SOLUTION

Do not make the database name same as the cluster name in 12.1.0.2 or higher because MGMTDB gets created and used by default. 

Starting 12.1.0.2, MGMTDM gets created by default during installation time. The MGMTDB must run starting 12.1.0.2.

The following workaround worked for some, so try the following workaround if changing the database name is not feasible:

1)connect to MGMTDB
$ export ORACLE_SID=-MGMTDB
$ sqlplus / as sysdba

2)modify local_listener of MGMTDB
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=<node1 interconnect IP>)(PORT=<mgmtlsnr port number>))','(ADDRESS=(PROTOCOL=TCP)(HOST=<node2 interconnectのIP>)(PORT=<mgmtlsnr port number>))' scope=both;


The above workaround connects to the management database and specifically sets the local_listener setting
0 0
原创粉丝点击