Link to home
Start Free TrialLog in
Avatar of DueFrom
DueFrom

asked on

SQL Server 2005 stored procedure to read/write to Websphere MQ

I manage a SQL 2005 database and was asked to come up with a way to read/write messages on a MQ server.  I have downloaded the MQ client v7 on my server.  The MQ server is managed by someone else and they have set me up with my designated Queue and Channel.  Can anyone give me some details on what I need to do on the SQL side to set up the connection from my stored procedure to the MQ server?   I read on another post to write a COM object that processes the messages to/from the queue, and then use sp_OACreate to create an instance of that object inside your stored procedure.  Can anyone help me figure this out?   Thank You.
Avatar of nmcdermaid
nmcdermaid

What interfaces/SDK methods does the MQ client give you?
SQL can access COM objects using those SP's. It can also call command lines with xp_cmdshell.
Weneed to know what interfaces the client gives you before we can suggest a method.
Avatar of DueFrom

ASKER

The supported API's are C, Cobol, PL/I, Java, RPG, C++, JMS, Perl, Windows Powershell, XMS for C/C++ and .Net, .Net, SOAP.  Is that what your asking?   I actually first created a small .net C# application, built a form to test connecting and sending/receiving a message off my queue and that worked.  I did this to just make sure the MQ client on my server was working.   The Queue on the MQ Server can trigger a stored procedure so that my data on the queue can insert directly into my database.  I just have no idea on my end what I need to do.
Avatar of DueFrom

ASKER

I just talked with my MQ support person and he thought the best approach would be for me to use my .Net C# application to connect and Get data from my Queue and then use this app  to execute a stored procedure to insert this data into my SQL database.   Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of nmcdermaid
nmcdermaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial