SQL Server 複寫SQL Server Replication

本主題的適用對象: 是SQL Server沒有Azure SQL Database沒有Azure SQL 資料倉儲沒有Parallel Data WarehouseTHIS TOPIC APPLIES TO: yesSQL ServernoAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

複寫是指,將資料和資料庫物件從某個資料庫複製和散發到另一個資料庫,然後在兩個資料庫之間進行同步處理,以維護一致性的一組技術。Replication is a set of technologies for copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency. 使用複寫,以透過區域網路、廣域網路、撥號連接、無線連接及網際網路,將資料散發到不同的位置,以及散發到遠端或行動使用者。Use replication to distribute data to different locations and to remote or mobile users over local and wide area networks, dial-up connections, wireless connections, and the Internet.

異動複寫一般用於需要高輸送量的伺服器對伺服器案例中,其中包括:提升延展性和可用性、資料倉儲和報表、整合多個站台的資料、整合異質資料,以及卸載批次處理。Transactional replication is typically used in server-to-server scenarios that require high throughput, including: improving scalability and availability; data warehousing and reporting; integrating data from multiple sites; integrating heterogeneous data; and offloading batch processing. 合併式複寫主要是為了可能具有資料衝突的行動應用程式或分散式伺服器應用程式而設計。Merge replication is primarily designed for mobile applications or distributed server applications that have possible data conflicts. 常見的案例包括:與行動使用者交換資料、消費者銷售點 (POS) 應用程式,以及多個站台的資料整合。Common scenarios include: exchanging data with mobile users; consumer point of sale (POS) applications; and integration of data from multiple sites. 快照式複寫用於提供交易式和合併式複寫的初始資料集;它也可以用於適合將資料完全重新整理時。Snapshot replication is used to provide the initial data set for transactional and merge replication; it can also be used when complete refreshes of data are appropriate. 使用這三種複寫, SQL ServerSQL Server 提供了強大且彈性的系統,可同步處理您企業中的資料。With these three types of replication, SQL ServerSQL Server provides a powerful and flexible system for synchronizing data across your enterprise. Windows Server 2012Windows Server 2012Windows 8Windows 8支援複寫至 SQLCE 3.5 和 SQLCE 4.0。Replication to SQLCE 3.5 and SQLCE 4.0 is supported on both Windows Server 2012Windows Server 2012 and Windows 8Windows 8.

複寫的替代方法是使用 Microsoft Sync Framework 以同步處理資料庫。As an alternative to replication, you can synchronize databases by using Microsoft Sync Framework. Sync Framework 包含多個元件以及一個直覺式且彈性的 API,而此 API 可簡化 SQL Server、SQL Server Express、SQL Server Compact 和 SQL Azure 資料庫之間的同步處理。Sync Framework includes components and an intuitive and flexible API that make it easy to synchronize among SQL Server, SQL Server Express, SQL Server Compact, and SQL Azure databases. Sync Framework 也會包含類別,您可以調整這些類別以同步處理 SQL Server 資料庫與 ADO.NET 相容的任何其他資料庫。Sync Framework also includes classes that can be adapted to synchronize between a SQL Server database and any other database that is compatible with ADO.NET. 如需 Sync Framework 資料庫同步處理元件的詳細文件,請參閱 同步處理資料庫For detailed documentation of the Sync Framework database synchronization components, see Synchronizing Databases. 如需 Sync Framework 的概觀,請參閱 Microsoft Sync Framework 開發人員中心For an overview of Sync Framework, see Microsoft Sync Framework Developer Center. 如需 Sync Framework 與合併式複寫的比較,請參閱 概觀和案例For a comparison between Sync Framework and Merge Replication, see Synchronizing Databases Overview

依區域瀏覽Browse by area