Saturday, February 25, 2012

queueing xml output to msmq

does anyone have an idea how can i queue xml output to msmq from the sql
query itselfSee KB article
http://support.microsoft.com/defaul...kb;en-us;555070
Sending a message to MSMQ from SQL requires writing a COM object and then
calling that COM object from a T-SQL procedure.
Mike
"kamal" <kamal@.discussions.microsoft.com> wrote in message
news:4B29558A-2504-4DC5-90FA-B80436406DF8@.microsoft.com...
> does anyone have an idea how can i queue xml output to msmq from the sql
> query itself
>|||I think in most cases you will find using an external application to
retrieve the XML and then send the MSMQ message will be more efficient
because the stored procedure will have to open the connection to MSMQ every
time it runs.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mike Jansen" <mjansen_nntp@.mail.com> wrote in message
news:uJtjAmNVFHA.3760@.TK2MSFTNGP15.phx.gbl...
> See KB article
> http://support.microsoft.com/defaul...kb;en-us;555070
> Sending a message to MSMQ from SQL requires writing a COM object and then
> calling that COM object from a T-SQL procedure.
> Mike
> "kamal" <kamal@.discussions.microsoft.com> wrote in message
> news:4B29558A-2504-4DC5-90FA-B80436406DF8@.microsoft.com...
>|||I've got a synchronization application (toned-down version of replication
with a few special requirements in it) that does that, but eliminates
polling by the application. I wrote an extended stored proc that sets a
named Windows event whenever another process needs to act. Code in a trigger
(in my case) calls the extended proc to set the event. The other process
waits on the named Windows event; when the event is fired, it queries the
database and does what it needs to do, which in this case actually happens
to be sending messages via MSMQ. You can then do all the performance
optimizations in the app, like Roger was saying, with the added benefit of
not having to poll. Of course, the drawback is that you are using a custom
extended procedure.
Mike
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:eWex$gRVFHA.928@.TK2MSFTNGP15.phx.gbl...
> I think in most cases you will find using an external application to
> retrieve the XML and then send the MSMQ message will be more efficient
> because the stored procedure will have to open the connection to MSMQ
every
> time it runs.
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Mike Jansen" <mjansen_nntp@.mail.com> wrote in message
> news:uJtjAmNVFHA.3760@.TK2MSFTNGP15.phx.gbl...
then
sql
>

No comments:

Post a Comment