5

I need a good way to replicate a single table in SQL Server 2012 between different servers and different databases. I tried replica which works just fine, but there might be a much better / easier way which I don't see right now.

Maybe there is a way to use the task to import data as a job. The data does not need to be synchronized all the time. It is fine that the second database [B] gets updated with the data from database [A] every 5-10 minutes.

Is it possible to setup a mirroring for only one table?

Of course I checked the web which gave me the idea to script the import task.

What else is possible and how?

6
  • Mirroring is not possible for one table its for whole database.
    – Shanky
    Feb 13, 2015 at 11:29
  • 1
    How big is the table ? You can use SSIS and do Incremental Loads every 5-10 mins. Check my answer here for more details. You can schedule SSIS package using SQLAgent job or use powershell to run it on multiple servers.
    – Kin Shah
    Feb 13, 2015 at 15:38
  • the table should contain a maximum of 500k rows, thank you sir. I will check that link Feb 13, 2015 at 17:38
  • Transactional replication would fit here. You need PK on table to implement it. Also, you have an option to keep continuous or scheduled synch.
    – SQLPRODDBA
    May 14, 2016 at 6:45
  • What if my table around 1.5 million rows and needed to be updated every night? I tried MERGE statement but due to different servers it takes too long. I need either just copy the whole table either update only records that been changed.
    – Serdia
    Feb 8, 2017 at 19:37

1 Answer 1

2

You can use snapshot replication (it allows you to update the table every 5-10 minutes). If you would like instant changes, go for transactional replication.

Note that you cannot publish a replication on SQL Server Express, you need at least Standard edition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.