Service Broker.

  • Hi Friends,

    I want to know something about “Service Broker”.

    I have two table. Table A and Table B. both are related. Some column are same

    My requirement is when I do any DML operation on Table A, I want some operation on Table B as well.

    One solution is Trigger. Another is handle it from front-end application.

    Can we use “Service Broker” over here? If yes, how?

    Thanks in advance!!

  • I don't know if Service Broker would be of any help here without knowing more about your situation. If after performing a DML operation on Table A you need to perform a long-running operation on Table B then it may benefit you to get Service Broker involved so you can perform the work on Table B at a later time (asynchronously) and still respond to the caller that modified Table A quickly, albeit without confirmation that Table B has been modified.

    That said you would still be evaluating the two options you mentioned: 1) using a trigger on Table A to pop something onto a Service Broker queue anytime DML was done on Table A. 2) have the front-end application pop the request onto the Service Broker queue and avoid using the trigger. As with most things it depends...which brings me back to wanting to know more about your situation.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • As OPC mentioned above, you'd still be using a trigger to feed Service Broker. All Service Broker would do is delay the update to the other table, and tighten up the requirements of the dml transactions.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Hi,

    we are implementing service broker in our application.I Want to know statistics about service broker means how many messages are there in the queue present?

    how many messages we sent till now?

    if there is any poison message how to handle?

    suppose the sender does send the message and the message reaches the target but the target does not accept the message how we come to know what the problem is?

    The sender does send the message, the message reaches the target and is accepted, but the target is unable to send back an acknowledgement how we come to know what the problem is?

    The sender does send the message, but the message never reaches the target how we come to know what the problem is?

    Please give reply

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

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