Sync Framework 2.1 introduces new features that enable the SQL Server or SQL Server Compact databases on your computer to synchronize with your SQL Azure database. This release also introduces parameter-based filtering, the ability to remove synchronization scopes and templates from the database, and enhanced performance to speed up and simplify the synchronization process.
SQL Azure Sync
With Sync Framework 2.1, you can extend your range of data to the WEB by leveraging the Windows Azure platform and SQL Azure database. By synchronizing your on-premises SQL Server database with SQL Azure, you can provide some or all of your data on the WEB without having to access your on-premises SQL Server database by providing a connection to your customers. After you use SQL Azure database configuration for synchronization, users can take the data offline and store it in a client database, such as the SQL Server Compact or SQL Server Express, so that your application can work in a disconnected state. And your customers don't need a stable network connection to work properly. Changes to field data can be synchronized back to the SQL Azure database and eventually synchronized back to the on-premises SQL Server database. Sync Framework 2.1 also includes features that enable good interaction with Windows Azure and SQL Azure's shared environment. These features include performance enhancements, the ability to define the maximum transaction size to avoid aborting, and the ability to automatically retry a transaction after Windows Azure aborts it.
The sync Framework allows you to flexibly build the structure of the synchronization community, but using a 2-tier or N-tier architecture is two typical approaches.
- 2-tier Architecture: The Sync Framework runs on the local computer and connects directly to the SQL Azure database using the Sqlsyncprovider object without having to go through the middle tier or Web server, such as the Internet information Servi CES (IIS).
- N-tier Architecture: Runs the Sync Framework database provider in Windows Azure managed services and communicates with the agent provider running on the local computer.
Batch Application Changes
The Sync Framework 2.1 leverages SQL Server 2008 and SQL Azure table-valued parameter functionality to apply multiple insert, UPDATE, and delete operations by using a single stored procedure call instead of requiring the stored procedure calls to apply each change. This greatly improves the performance of these operations during the change of application and reduces the number of round trips between the client and the server. When you set up a SQL Server 2008 or SQL Azure database, the bulk process is created by default.
parameter-based filtering
Sync Framework 2.1 supports the creation of parameter-based filters to control which data is synchronized. Parameter-based filters are especially useful when a user wants to filter data based on a field with many different values, such as a user ID or range, or based on a combination of two or more fields. Create a parameter-based filter in two steps. First, you define filters and scope templates. Then, create a filtered scope that has specific values for the filter parameters. This two-step process has the following advantages:
- Easy to set up. A filter template needs to be defined only once. Creating a filter template is the only action that requires permission to create a stored procedure in the database server. This step is typically performed by the database administrator.
- Easy to subscribe to. The client specifies the parameter values to be created and subscribes to the filtered scopes as needed. This step only requires permission to insert rows in the synchronization table of the database server. This step can be performed by the user.
- Easy to maintain. Even when you combine several parameters and create many filtered scopes, maintenance is simple because you use a single parameter-based procedure to enumerate the changes.
Delete scopes and templates
Sync Framework 2.1 Adds the sqlsyncscopedeprovisioning and sqlcesyncscopedeprovisioning classes that enable you to easily remove synchronization elements from a database that has been set up for synchronization. By using these classes, you can remove scopes, filter templates, and associated metadata tables, triggers, and stored procedures from the database.
Upgrade metadata Format
The metadata format for the database provider was changed in Sync Framework 2.1. The new metadata format is incompatible with earlier versions of the database provider. The upgrade to the new metadata format cannot be undone, and the sync Framework throws an exception when you try to synchronize a database in the 2.1 format using an earlier version of the database provider. However, the Sqlsyncprovider class in Sync Framework 2.1 detects whether the metadata is in 2.0 or 2.1 format, and operates in backward compatibility mode to synchronize a database that contains metadata in 2.0 format. The sync Framework synchronizes a 2.0-format database with a 2.0-or 2.1-format database. Therefore, you do not need to upgrade all of the databases in the synchronization community at the same time. For example, in an N-tier architecture, you can upgrade the Server Sync Framework component and the database metadata format and continue to synchronize with clients that use Sync Framework 2.0. The client can wait until it is convenient to upgrade.
SQL Server Compact 3.5 SP2 Compatibility
The Sync Framework 2.1 Sqlcesyncprovider Database provider object uses the SQL Server Compact 3.5 SP2. The existing SQL Server Compact database will be upgraded automatically when the Sync Framework connects to them. Another new feature is that the SQL Server Compact 3.5 SP2 provides a change tracking API that provides the ability to configure, enable, and disable change tracking for tables, and supports access to change tracking data for that table. You can download the SQL Server Compact 3.5 SP2 from here.
Sync Framework 2.1 Redistributable Package
To download the Microsoft Sync Framework 2.1 Redistributable Package, not the SDK package, click the link: Microsoft Sync Framework 2.1 Redistributable Package
: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=19502&6B49FDFB-8E5B-4B07-BC31-15695C5A2143= 1
Microsoft Sync Framework 1.0 Sp1microsoft Sync Framework 1.0 SP1-Chinese https://download.microsoft.Com/download/b/9/d/b9d6e014-c949-4a1e-ba6b-2e0deba23e54/syncsetup_zh-chs.x64.zip
Https://download.microsoft.com/download/B/9/D/B9D6E014-C949-4A1E-BA6B-2E0DEBA23E54/SyncSetup_zh-CHS.x86.zip
Microsoft Sync Framework 2.1 Redistributable Package Microsoft Sync Framework 1.0 SP1-Chinese (Simplified)