简体   繁体   中英

How to create and maintain SQL Server database replica

I have a SQL server 2012 database on a server, which is a development database. I want to create an another database on other machine which will be exact replica of the original one and as soon as any changes occur in schema and data it should get migrated to this second database. I tried the log shipping method but in that case secondary database goes in Restoring mode whereas I want both the database active and functioning at the same time. Performance or locks doesn't matter.

Any other easy way to do this? a utility that runs periodically automatically would also be great.

With log shipping the databases may be in readonly state most of the time, unless the periods when you run scheduled restore job.

Other options to consider - transactional replication, mirroring with readonly via snapshot or AlwaysOn Avalaibility groups with readable replicas, backup/restore (initial full backup/restore, then differential + trans logs) - but the last option is not for large databases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM