[IBM i]

Deleting a multi-instance queue manager on IBM i

Before you delete a multi-instance queue manager, stop remote journaling, and remove queue manager instances.

Before you begin

  1. In this example, two instances of the QM1 queue manager are defined on the servers ALPHA and BETA. ALPHA is the active instance and BETA is the standby. The queue manager data associated with the queue manager QM1 is stored on the IBM® i server GAMMA, using NetServer. See Creating a multi-instance queue manager using journal mirroring and NetServer on IBM i.
  2. ALPHA and BETA must be connected so that any remote journals that are defined can be deleted by IBM MQ.
  3. Verify that the /QNTC directory and server directory file share can be accessed, using the system commands EDTF or WRKLNK

About this task

Before you delete a multi-instance queue manager from a server using the DLTMQM command, remove any queue manager instances on other servers using the RMVMQMINF command.

When you remove a queue manager instance using the RMVMQMINF command, local and remote journals prefixed with AMQ, and associated with the instance, are deleted. Configuration information about the queue manager instance, local to the server, is also deleted.

Do not run the RMVMQMINF command on the server holding the remaining instance of the queue manager. Doing so prevents DLTMQM from working correctly.

Delete the queue manager using the DLTMQM command. Queue manager data is removed from the network share. Local and remote journals prefixed with AMQ and associated with the instance are deleted. DLTMQM also deletes configuration information about the queue manager instance, local to the server.

In the example, there are only two queue manager instances. IBM MQ supports a running multi-instance configuration that has one active queue manager instance and one standby instance. If you have created additional queue manager instances to use in running configurations, remove them, using the RMVMQMINF command, before deleting the remaining instance.

Procedure

  1. Run the CHGMQMJRN RMTJRNSTS (*INACTIVE) command on each server to make remote journaling between the queue manager instances inactive.
    1. On ALPHA:
      
      CHGMQMJRN MQMNAME('QM1')
      RMTJRNRDB('BETA') RMTJRNSTS(*INACTIVE)
      
    2. On BETA:
      
      CHGMQMJRN MQMNAME('QM1')
      RMTJRNRDB('ALPHA') RMTJRNSTS(*INACTIVE)
      
  2. Run the ENDMQM command on ALPHA, the active queue manager instance, to stop both instances of QM1.
    
    ENDMQM MQMNAME(QM1) OPTION(*IMMED) INSTANCE(*ALL) ENDCCTJOB(*YES)
    
  3. Run the RMVMQMINF command on ALPHA to remove the queue manager resources for the instance from ALPHA and BETA.
    
    RMVMQMINF MQMNAME(QM1)
    

    RMVMQMINF removes the queue manager configuration information for QM1 from ALPHA. If the journal name is prefixed by AMQ, it deletes the local journal associated with QM1 from ALPHA. If the journal name is prefixed by AMQ and a remote journal has been created, it also removes the remote journal from BETA.

  4. Run the DLTMQM command on BETA to delete QM1.
    
    DLTMQM MQMNAME(QM1)
    

    DLTMQM deletes the queue manager data from the network share on GAMMA. It removes the queue manager configuration information for QM1 from BETA. If the journal name is prefixed by AMQ, it deletes the local journal associated with QM1 from BETA. If the journal name is prefixed by AMQ and a remote journal has been created, it also removes the remote journal from ALPHA.

Results

DLTMQM and RMVMQMINF delete the local and remote journals created by CRTMQM and ADDMQJRN. The commands also delete the journal receivers. The journals and journal receivers must follow the naming convention of having names starting with AMQ. DLTMQM and RMVMQMINF remove the queue manager objects, queue manager data, and the queue manager configuration information from mqs.ini.

What to do next

An alternative approach is to issue the following commands after deactivating journaling in step 1 and before ending the queue manager instances. Or, if you have not followed the naming convention, you must delete the journals and journal receivers by name.
  1. On ALPHA:
    
    RMVMQMJRN MQMNAME('QM1') RMTJRNRDB('BETA')
    
  2. On BETA:
    
    RMVMQMJRN MQMNAME('QM1') RMTJRNRDB('ALPHA')
    
After deleting the journals, continue with the rest of the steps.