Synchronizing SQL Server and SQL Azure – Database Journal

Synchronizing SQL Server and SQL Azure – Database Journal


SQL Azure Data Sync provides data synchronization between the cloud and local SQL Server databases. Learn how SQL Azure Data Sync allows you to keep the most concurrent information in the cloud while allowing mobile users, businesses, and enterprise data sources all to have access to this data.

In an effort to bring a flexible cloud-computing experience Microsoft has
introduced the Microsoft Azure platform. One of the many offerings is the cloud-based
relational database service built on SQL Server technologies called Microsoft
SQL Azure Database
. To help keep managed data movement between the
cloud based SQL Azure Database and your local SQL Server databases, Microsoft
has provided a tool called SQL Azure Data Sync. Let’s look closer at this powerful
tool.
SQL Azure Data Sync allows one to keep the most concurrent information in
the cloud (SQL Azure) and allows mobile users, businesses, and enterprise data
sources all to have access to this data, which is in the cloud, facilitating
office machines as well as mobile desktop and handhelds to work together.
SQL Azure Data Sync allows:
It also provides Microsoft Visual Studio templates, which allow developers
to bring the SQL Azure Database to SQL Compact Databases.
To get started, you need to do the following:
Once you have signed up for the offer mentioned above and activated your account, visit https://sql.azure.com/projectviewer.aspx and setup your database. To allow for the SQL Azure Data Sync tool to work, you will need to allow filters for the external IP address of the machine from which you are running the Data Sync tool.
Here is how the screen looks.
setting up your database
Once you have setup the SQL database, copy the database name and administrator name for use in the Data Sync tool.
Start the SQL Azure Data Sync tool.
SQL Azure Data Sync tool
Click Next.
Enter the Azure SQL database credentials you created above. Once you enter the credentials, test the connection by clicking on “Test Connection”. If you get an error saying connection failed despite providing the right credentials, double check that the external IP is allowed through the firewall settings.
check that the external IP is allowed through the firewall settings
Click Next. On this screen, enter the name and credentials for the local database you want to use for syncing with the Microsoft Azure database.
enter the name and credentials for the local database
Click Next. On the next page, select the tables that need to be synchronized. Also, select the database that will prevail in case of conflicts. Then click Next.
select the tables which need to be synchronized
On the next screen, choose the table ordering.
choose the table ordering
On the summary page, name your synchronization job and click Process.
name your synchronization job and click Process
Once you click Process, it will create a Job with the name specified which will be visible under SQL Server Management studio under “SQL Server Agent -> Jobs”. Whenever you want to synchronize your database, you now only need to run this job.
Data Synchronization is also easier programmatically. If you have installed the tools mentioned above and you have Microsoft Visual Studio 2008 Professional, you will get a new item template called SqlAzureDataSyncClient. When it is added to a project, SqlAzureDataSyncClient automatically does the underlying plumbing and makes the necessary classes to facilitate data synchronization.
The steps are similar to the Data Sync tool. The only difference here is that when you add a new item “SQLAzureDataSyncClient“, a wizard pops up and asks a bunch of questions that captures the information, which is then used to create the classes and project references.
We saw how SQL Azure Data Sync tools work and what they are used for. I hope that this information will be useful when you are working to synchronize your data between Azure Database and your local SQL Server database. Happy Syncing!
Free Microsoft Azure SQL Tools For Cloud Application Development
Microsoft Azure cloud database (SQL Azure) pricing tweaked
Get Started with SQL for Cloud Computing: Microsoft SQL Data Services
Subscribe to Cloud Insider for top news, trends & analysis
DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases–foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.
Advertise with TechnologyAdvice on Database Journal and our other IT-focused platforms.
Property of TechnologyAdvice.
© 2022 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

source