|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQAX & SQL 2000 |
« View previous topic :: View next topic » |
Author |
Message
|
ewilliams |
Posted: Wed Dec 11, 2002 4:43 pm Post subject: MQAX & SQL 2000 |
|
|
 Apprentice
Joined: 27 Nov 2002 Posts: 30 Location: Portland
|
SQL2000 Programmers out there -
I've made some headway with my quest. The SQL at the end produces the following error.
I think there is a possibility this can work but I am not a strong SQL2000 guru. It will run fine if the /* Set the Queue object */ section is commented out. Also I tried different queue options with no luck.
Any suggestions?
Thanks
Eric
ERROR BELOW
--------------------------------------------------------------------
Code: |
Error,Source,Description,HelpFile,HelpID
0x80047D00,mqax200,MQAX200.MQQueueManager::AccessQueue CompletionCode = 2, ReasonCode = 2059, ReasonName = MQRC_Q_MGR_NOT_AVAILABLE,,0 |
SQL BELOW
--------------------------------------------------------------------
Code: |
DECLARE @objMQSess int;
DECLARE @objMQQMgr int;
DECLARE @hr int;
DECLARE @src varchar(255), @desc varchar(255);
/*Create MQ objMQSess*/
EXEC @hr = sp_OACreate 'MQAX200.MQSESSION', @objMQSess OUT
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objMQSess, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
RETURN
END
/*Create MQ objMQQMgr*/
EXEC @hr = sp_OACreate 'MQAX200.MQQUEUEMANAGER', @objMQQMgr OUT
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objMQQMgr, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
RETURN
END
/* Set the Queue Manager object */
EXEC @hr = sp_OAMethod @objMQSess, 'AccessQueueManager', NULL, 'QM.DUNE2.SL.QA'
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objMQSess
RETURN
END
/* Set the Queue object */
EXEC @hr = sp_OAMethod @objMQQMgr, 'AccessQueue', NULL, 'Q.TEST.IN', 17 /* 17=MQOO_OUTPUT Or MQOO_INPUT_AS_Q_DEF */
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objMQQMgr
RETURN
END
/*Destroy MQ objMQSess*/
EXEC @hr = sp_OADestroy @objMQSess
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objMQSess
RETURN
END |
|
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 12, 2002 6:00 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I'm not sure that I understand everything that you are doing. However, in the 2059 indicates that the qmgr is not available and doesn't really apply to the queue. I did notice the following line of code in the queue section:
EXEC sp_OAGetErrorInfo @objMQQMgr
that is probably accessing the Qmgr and causing the 2059. I'd suggest running the amqsput sample to check your qmgr availability:
- amqsput Q.TEST.IN QM.DUNE2.SL.QA
- set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/hostname
amqsputC Q.TEST.IN QM.DUNE2.SL.QA
The first amqsput will check for the qmgr being available. The second one will check as a client (note the C on end of amqsput) which will verify that the listener is running.
Hope this helps. |
|
Back to top |
|
 |
ewilliams |
Posted: Thu Dec 12, 2002 10:55 am Post subject: |
|
|
 Apprentice
Joined: 27 Nov 2002 Posts: 30 Location: Portland
|
amqsput worked fine and the amqsputc didn't, which was expected since this is a server, not client installation MQ Series. SQL2000 is on the same machine as MQ Series Server. Access doesn't seem to be an issue.
FYI the SQL User is also in the MQM group on the server. |
|
Back to top |
|
 |
MichaelR |
Posted: Mon Dec 16, 2002 7:52 am Post subject: MQAX & SQL2000.... |
|
|
Apprentice
Joined: 20 May 2002 Posts: 37 Location: Tampa
|
Have you tried adding the following environment variable to your windows environment?
GMQ_MQ_LIB = c:\program files\mqseries\bin\mqic32.dll
I experienced a similar problem a while back using the MQAX control and this resolved it.
BTW: This will allow you to run AMQSxxxC (client) applications on MQ Servers. This is a "workaround" if someone were to provide you MQC code for your MQM environment. Just don't forget to add either MQServer or channel table environment variables as well.
MichaelR
 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|