数据库复制.2台服务器,主数据库,第二台是只读的 [英] Database replication. 2 servers, Master database and the 2nd is read-only

查看:42
本文介绍了数据库复制.2台服务器,主数据库,第二台是只读的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设您有 2 个数据库服务器,其中一个数据库是执行所有写入操作的主"数据库,它被视为真实/原始"数据库.另一台服务器的数据库是主数据库(从?)的镜像副本,用于应用程序的某个部分的只读操作.

Say you have 2 database servers, one database is the 'master' database where all write operations are performed, it is treated as the 'real/original' database. The other server's database is to be a mirror copy of the master database (slave?), which will be used for read only operations for a certain part of the application.

你如何设置一个从数据库来镜像主数据库上的数据?据我了解,slave/readonly 数据库是使用master db 的事务日志文件来镜像数据是否正确?
在从数据库镜像数据的频率方面,我有哪些选择?(实时/每 x 分钟?).

How do you go about setting up a slave database that mirrors the data on the master database? From what I understand, the slave/readonly database is to use the master db's transaction log file to mirror the data correct?
What options do I have in terms of how often the slave db mirrors the data? (real time/every x minutes?).

推荐答案

您需要的是 SQL Server 2005 中的事务复制.它将在发布者(即主")数据库更新时近乎实时地复制更改.

What you want is called Transactional Replication in SQL Server 2005. It will replicate changes in near real time as the publisher (i.e. "master") database is updated.

这里有一个很好的设置指南.

这篇关于数据库复制.2台服务器,主数据库,第二台是只读的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆