SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Synchronizing many real-time data tables from multiple MySQL instances... is Service Broker suitable...


Synchronizing many real-time data tables from multiple MySQL instances... is Service Broker suitable for this task?

Author
Message
clubbavich
clubbavich
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1167 Visits: 1032
Hi all, I have zero experience with Service Broker, but from what I've read on the subject, it may be a solution to the problem I need to solve.

I've got multiple instances of an application, each with its own MySQL database. I am currently using stored procedures and SQL Agent to query these MySQL database to retrieve the most recent realtime data once every 5 minutes. This works, but it's not going to scale. The job takes up to 5 minutes to run on occasion (usually takes about 45 seconds). It's not a massive amount of data, and it really should take less time than it is.

I've basically got a stored procedure that loops through the instances that need to be queried, and then executes a stored procedure for each table to synchronize, providing an Instance ID and Linked Server Name to each of those stored procedures that are pulling data from the MySQL Instance.

My thinking is that instead of running the stored procedures individually within that loop, it would instead add those stored procedures with the provided parameters to a queue, and have that same instance of SQL server process those messages, with each server instance being synchronized in parallel. In case it matters, the version of SQL Server I am using is SQL 2012 Standard.

Is this something that Service Broker would be suitable for? Is there possibly a better solution?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search