开发者

Synching two table in SQL Server

开发者 https://www.devze.com 2023-01-11 16:53 出处:网络
Hi I have two database servers (2 different 开发者_JAVA技巧machine, but on same network). I have one table in Database_1 and same table in Database_2.

Hi I have two database servers (2 different 开发者_JAVA技巧machine, but on same network). I have one table in Database_1 and same table in Database_2.

Only Table in DB_1 will be updated by user, table in DB_2 will be used by other user for read only.

I want to program something which can copy the updated record from table in DB_1 to DB_2. I want to make it event based, something like whenever someone insert a record in Table@DB_1, I will get the same the record in Table@DB_2.

Can someone suggest me something?


Depending on the size, frequency of updates, and complexity of your systems, Replication may be the answer you need. Transactional replication sounds the most suitable, from the little detail provided.


How time sensitive is the data? There are two possibilities with this for me.

Suggestion 1: Have triggers to keep the data synced to the table on a linked server.

Suggestion 2: Have a DTS/SSIS package that keeps DB_2 in sync. Schedule the package to run every minute or five minutes depending on what is necessary.


Check out Oracle GoldenGate.

"Oracle GoldenGate provides real-time, log-based change data capture, and delivery between heterogeneous systems. Using this technology, it enables cost-effective and low-impact real-time data integration and continuous availability solutions."

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号