Removing database manager instances

For to remove a database from your configuration permanently, ensure that the database is not in doubt before you restart the queue manager.

Database products provide commands for listing in-doubt transactions. If there are any in-doubt transactions, first allow the queue manager to resynchronize with the database. Do this by starting the queue manager. We can verify that resynchronization has taken place by using the rsvmqtrn command or the database's own command for viewing in-doubt units of work. Once you are satisfied that resynchronization has taken place, end the queue manager and remove the database's configuration information.

If you fail to observe this procedure the queue manager still remembers all in-doubt units of work involving that database. A warning message, AMQ7623, is issued every time the queue manager is restarted. If we are never going to configure this database with the queue manager again, use the -r option of the rsvmqtrn command to instruct the queue manager to forget about the database's participation in its in-doubt transactions. The queue manager forgets about such transactions only when in-doubt transactions have been completed with all participants.

There are times when you might need to remove some resource manager configuration information temporarily. On UNIX and Linux systems this is best achieved by commenting out the stanza so that it can be easily reinstated at a later time. We might decide to do this if there are errors every time the queue manager contacts a particular database or database manager. Temporarily removing the resource manager configuration information concerned allows the queue manager to start global units of work involving all the other participants. Here is an example of a commented-out XAResourceManager stanza follows:
Figure 1. Commented- out XAResourceManager stanza on UNIX and Linux systems
# This database has been temporarily removed
#XAResourceManager:
#  Name=mydb2
#  SwitchFile=db2swit
#  XAOpenString=mydbname,myuser,mypassword,toc=t
#  ThreadOfControl=THREAD

On Windows systems, use the IBM MQ Explorer to delete the information about the database manager instance. Take great care to type in the correct name in the Name field when reinstating it. If you mistype the name, you may face in-doubt problems, as described in Change configuration information.

Parent topic: Change configuration information