Reputation: 665
I'm migrating a queue from one QM to another. I stopped the application reading the queue, but I don't have control over the application putting to it.
What I want to do is:
For this to work, I need to stop the application making the PUT because it's keeping the old queue opened (when trying to delete I have the "Object is open" error). The application in question cannot be easily stopped, however, due to some SLA constraints.
I would like to find a command that would force the release of this queue and remove it, thus forcing the client (application doing PUT) to reconnect. Or is there any other way to achive this at runtime?
Upvotes: 1
Views: 6699
Reputation: 1244
Queue which has open handle can not be deleted. I suggest stopping the connection from the application and then delete the queue before the application making a new connection. Other option would be to stop the channel instance, delete the queue and then start the channel instance. However, for a SVRCONN channel, it would affect other applications if they use the same channel.
Identify the connection using DISPLAY CONN:
http://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.adm.doc/q086140_.htm
Stop the connection using STOP CONN: http://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.adm.doc/q086790_.htm
If this is not helpful (e.g. the application might initiate a new connection before the queue is deleted) then you could try STOP CHL. However as indicated other applications might be affected depending on whether they use the same channel or different channel. Moreover if you running the Channel Process in FASTPATH mode (trusted listener), mode FORCE can not be used.
Upvotes: 2