I'm using SQL Server 2008. I have two databases called Adb
and Bdb
. There is a common table called commonTable
. How can I update Adb
database every 15 minutes using the data from the same table in Bdb
?
SQL Server – How to Update One Database from Another
sql server
Related Question
- Sql-server – Copy SQL Logins and Permissions From One Server to Another
- sql-server – Periodically Update Table with New Records from Another Server
- Sql-server – How to copy data from one database to another database efficiently
- SQL Server – Using Change Tracking Functions from Another Database
- Sql-server – Copy table from one server to another including keys and indexes
Best Answer
Without more specifics:
Now schedule that stored procedure every 15 minutes using a SQL Server Agent job.
Isolation, concurrency, error handling etc. are all additional considerations, but most concerns should be minor if this is the only process that writes to
Adb
. You might also consider a more conciseMERGE
command, but the syntax is daunting and it buys you less than you might expect in terms of improving concurrency and eliminating race conditions.You might also want to consider transactional replication - get rid of this concept of having to do anything manually, and also the idea that data could be up to 15 minutes out of date.