📜  镜像和复制的区别

📅  最后修改于: 2021-09-11 06:18:24             🧑  作者: Mango

镜像:
镜像也称为Shadowing ,是创建数据和数据库的多个副本的过程。通常在镜像中,数据库被复制到与其主数据库完全不同的机器或位置。如果此时有主服务器宕机进行维护,系统会自动故障到镜像数据库。因此,在任何给定时间,只能获得一份副本。

镜像是在数据库上完成的。并且不支持分布式数据库。镜像数据库和主数据库之间的紧密耦合是在交易日志到反射数据库的因果块的帮助下建立的。万一发生任何故障,它还能够通过将信息从一个数据库重复到另一个数据库来恢复信息。一旦发生任何故障,镜像数据库将成为主体信息。

复制:
复制是将数据库对象和数据分布在完全不同的数据库中以增加信息供给的方法。它能够从地理分布的站点汇总公司信息,并将信息传播到网络或局域网上的远程用户。在这种情况下,增加了并行执行。发布者是关联实体,具有复制到 Microsoft SQL 服务器中不同服务器的信息。
订阅者可以是通常从发布者接收复制信息的服务器。有三种类型的 Microsoft SQL 服务器用于复制操作:-

  • 交易复制
  • 合并复制
  • 快照复制

镜像和复制的区别:

S.NO Parameter Mirroring Replication
1. Basic Mirroring is the copying of data or database to a different location. While replication is the creation of data and database objects to increase the distribution actions.
2. Performed on We perform mirroring on the database. While we perform replication on the objects of data and database.
3. Cost Mirroring operation on database is costlier than replication. While replication is less costlier than mirroring.
4. Distributed database Mirroring does not support the distributed database. While replication supports the distributed database.
5. Location Generally mirror database is implemented on a different machine or location from its main database. While in replication, the database and data objects are kept in another database.