Copy a table data from a database on another one server
I want to copy a table with data from a database on one server to a database on a second server. The source table will refresh within next 3 min with new data. What is the best way to do this?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant SrivastavaRank #581 · 4.2K reputationPosted Jul 15, 2013, 12:24 PM EDT
In the Job, you could use 'SQL Merge' to copy newly added rows into destination datatable
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 15, 2013, 6:53 PM EDT
hi,
yes SQL job is good option if you use other than SQL Express. because SQL Express does not support SQL job.
to Communicate between to Database server you can use linkserver.
Please refer
http://msdn.microsoft.com/en-us/library/ms188279.aspx
you can also implement the CDC or CT to change track
please refer my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/change-data-capture-cdc-in-sql-server-2008/
http://www.c-sharpcorner.com/UploadFile/ff2f08/change-tracking-in-sql-server/
hope this will help you.
Pankaj PandeyRank #642 · 3.7K reputationPosted Jul 15, 2013, 9:15 PM EDT
i am not sure but you can try Mirroring option, because the job task are for same server i didn't see the option for run for another server.
May be i am wrong, but after creating linked server you can use the job task to update your database.
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 15, 2013, 9:25 PM EDT
hi,
agree with Pankaj, instead of mirroring you can also use data base replication.
http://msdn.microsoft.com/en-us/library/ms151198.aspx
http://www.codeproject.com/Articles/215093/Replication-in-MS-SQL-Server
http://msdn.microsoft.com/en-us/library/ms151799.aspx
hope this will help you.