Relocate MGMTDB Database To Another Node

Introduction

Relocating a Management Database (MGMTDB) database to another node is a critical task in ensuring the smooth operation and management of your database environment. Whether you’re upgrading hardware, optimizing performance, or performing maintenance, this guide will walk you through the process to ensure a seamless transition. Follow these steps to successfully relocate your MGMTDB database to another node.

MTMTDB: Grid Infrastructure Management Repository

MGMTDB is new database instance which is used for collecting or storing real time Cluster Health Monitor (CHM) data of each node. In 11g this was being stored in berkeley database but starting Oracle database 12c it is configured as Oracle Database Instance.

It can be located at any node but only one instance in the cluster, you may regard it as a RAC one node database. Whenever the hosting node is under some kind of pressure, we can move it to another node.

How To Relocate MGMTDB database to Another Node

  1. Check On which Node MGMTDB is running
  2. Relocate to the Node
  3. Validate the node After relocating

1. Check On which Node MGMTDB is running

##Check through PMON Process##

[grid@node1 ~]$ ps -ef|grep pmon

grid     21684     1  0 Jul22 ?        00:02:23 asm_pmon_+ASM1

grid     23868     1  0 Jul22 ?        00:02:24 mdb_pmon_-MGMTDB

oracle   28677     1  0 Jul22 ?        00:05:14 ora_pmon_DBPROD1




##Check Status of MGMTDB##

[grid@node1 ~]$ srvctl status mgmtdb

Database is enabled
Instance -MGMTDB is running on node node1




##You can aslo check status through CRSCTL ##

##Go to $GRID_HOME/bin directory through root user##

[root@node1 bin]# pwd

/u01/app/12.2.0/grid/bin



[root@node1 bin]# ./crsctl status res ora.mgmtdb

NAME=ora.mgmtdb
TYPE=ora.mgmtdb.type
TARGET=ONLINE
STATE=ONLINE on node1




In above Case you can see MGMTDB is running on Node1 and you can check status of database running on which node through various ways.

2. Relocate to the Node

[grid@node1 ~]$ srvctl relocate mgmtdb -n node2

Use above mentioned command to move it to another node through grid user, in my case I am moving it to node2. You can replace node2 and mention your node name accordingly.

3. Validate the node After relocating

##Check through PMON Process##

[grid@node2 ~]$ ps -ef|grep pmon

grid     22984     1  0 Jul22 ?        00:03:13 asm_pmon_+ASM2

grid     23368     1  0 Jul22 ?        00:04:24 mdb_pmon_-MGMTDB

oracle   28577     1  0 Jul22 ?        00:03:50 ora_pmon_DBPROD2





##Check Status of MGMTDB##

[grid@node2 ~]$ srvctl status mgmtdb

Database is enabled
Instance -MGMTDB is running on node node2






##You can aslo check status through CRSCTL ##

[root@node1 bin]# ./crsctl status res ora.mgmtdb

NAME=ora.mgmtdb
TYPE=ora.mgmtdb.type
TARGET=ONLINE
STATE=ONLINE on node2

As you can see MGMTDB is moved to Node2.

Note: MGMTDB takes about 1GB memory of the server, if your RAC servers are small, medium and tight for resource, you don’t have to create it during grid installation.

Conclusion

Relocating a Management Database (MGMTDB) database to another node requires careful planning and execution to minimize downtime and ensure a successful migration. By following these steps, you can confidently move your MGMTDB database to a new node while maintaining the integrity and performance of your database environment. Always remember to test thoroughly and keep backups at every critical stage of the migration process.

How to Remove MGMTDB Database

Leave a Comment

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