Returning XML to MSMQ via Trigger

  • I have asked to trigger a message using MSMQ send an XML document to the queue. Another application will be reading the messages and forwarding them to a backend system. My question is (Part I) does SQL have a way to send a message to MSMQ and (Part II) can I create an XML document inside the trigger to send to the MSMQ?

    Using SQL Server 2000

  • Part I

    Yes

    Part II

    You will have to change the strategy a little bit because Doing all the processing inside the trigger will be a little painful performance wise

    This is what I would do (bear with me):

    Create a DTS Package and in it Generate the XML file reading Parameters from a configuration table, then use the MSMQ task to put it in the queue

    2. On the Trigger Just update The config Table to let the above package know what to do

    3. Create a job that runs the above package.

    4. Once the Trigger is done with the processing you can write to the eventlog a special error to trigger an alert that would run the job!

    Hope is clear


    * Noel

  • how can i write to the eventlog?

    quote:


    Part I

    Yes

    Part II

    You will have to change the strategy a little bit because Doing all the processing inside the trigger will be a little painful performance wise

    This is what I would do (bear with me):

    Create a DTS Package and in it Generate the XML file reading Parameters from a configuration table, then use the MSMQ task to put it in the queue

    2. On the Trigger Just update The config Table to let the above package know what to do

    3. Create a job that runs the above package.

    4. Once the Trigger is done with the processing you can write to the eventlog a special error to trigger an alert that would run the job!

    Hope is clear


  • DOCUMENTED IN BOL :

    xp_logevent


    * Noel

  • Concerning part I consider:

    http://www.sqlservercentral.com/products/xp_msmq/

    best regards,

    chris.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply