是否可以实时同步2个SQL Server数据库 [英] Is it possible to real-time synchronize 2 SQL Server databases

查看:51
本文介绍了是否可以实时同步2个SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在服务器 A 上运行,而数据库在同一台服务器上
有一个备用服务器 B,我会在服务器 A 停机时使用它

I have an application that runs on server A and the database is on the same server
there is a backup server B which I use in case the server A is down

应用程序将保持不变,但数据库中的数据在不断变化

the application will remain unchanged but the data in the DB is changing constantly

有没有办法自动实时同步这两个数据库?

Is there a way to synchronize those 2 databases real-time automatically?

目前我会等到所有用户都离开后才能在备份服务器中手动备份和恢复.

currently I wait till all the users are gone so I can manually backup and restore in the backup server.

当我说实时时,我并不是字面上的意思,我可以处理长达一小时的延迟,但同步越快越好.

When I said real-time I didn't mean it literally, I can handle up to one hour delay but the faster sync the better.

  • 我的数据库位于同一本地网络的 2 台服务器上.

  • My databases are located on 2 servers on the same local network.

其中 2 个是 SQL Server 2008,主数据库在 windows server 2008 上

2 of them are SQL Server 2008, the main DB is on windows server 2008

备份在 windows server 2003 上

the backup is on windows server 2003

一个网络应用程序(内联网)正在使用数据库

A web application (intranet) is using the DB

我可以使用 sql 代理(如果有帮助的话)

I can use sql agent (if that can help)

我不知道什么样的细节可以帮助解决这个问题,请告诉我什么可以帮助.谢谢.

I don't know what kind of details could be useful to solve this, kindly tell me what can help. Thanks.

编辑:我只需要同步所有表格和表格.
第二个数据库是可写不是只读的

Edit: I need to sync all the tables and table only.
the second database is writable not read-only

推荐答案

我想你想要的是 点对点事务复制.

来自链接:

点对点复制提供横向扩展和高可用性通过跨多个服务器维护数据副本的解决方案实例,也称为节点.建立在事务复制,点对点复制传播近乎实时的事务一致性变化.这使需要横向扩展读取操作以分发的应用程序来自多个节点的客户端的读取.因为数据是几乎实时地、对等地跨节点维护复制提供了数据冗余,从而提高了可用性数据.

Peer-to-peer replication provides a scale-out and high-availability solution by maintaining copies of data across multiple server instances, also referred to as nodes. Built on the foundation of transactional replication, peer-to-peer replication propagates transactionally consistent changes in near real-time. This enables applications that require scale-out of read operations to distribute the reads from clients across multiple nodes. Because data is maintained across the nodes in near real-time, peer-to-peer replication provides data redundancy, which increases the availability of data.

这篇关于是否可以实时同步2个SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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