Azure DB sync or mirror between DBs hosted in different azure accounts - azure

I need to mirror sync two azure DBs stored in two different azure accounts (so different subscription also different azure enterprise accounts as well); the DB is Azure DB not SQL Server in azure VM.
the DBs are in the same geo area.
how can this be achieved?
thank you

The Answer is no,you can't have mirroring between two SQLAzure databases even if they are in same region..
It seems that you are trying to keep two databases in sync which are in different regions and are under different subscriptions..This is not possible,only HA option SQLAzure supports is replication with onpremises as publisher and SQLAzure database as subscriber..
One more option you can use is Georeplication(only for premium ,last when i checked) which keeps one more database in sync, which can be in different region

Related

Need to sync data from one database in azure to another database where both databases have different location and different server

I'm trying to sync two databases in azure paas having different location and different server.
When I try to create a sync group I'm not able to see the database in other regions.
Sync two databases in different location using azure portal.
For your question, please see FAQ about SQL Data Sync:
What regions support Data Sync
SQL Data Sync is available in all regions.
Data Sync support you sync two databases in azure paas having different location and different server.
Did you followed this document: Tutorial: Set up SQL Data Sync between Azure SQL Database and SQL Server on-premises ?
For example I have two SQL database in different Azure SQL Server and region.
Server 1:
Server 2:
Set 'Mydatabase' database in Server 1 as Hub database, add the 'dbleon' database in Server 2 as member database:
Every thing works ok.
Hope this helps.

SQL Azure and CDN

what is the best way to limit latency for SQL Azure in global applications?
My Application uses SQL Azure and would like to know based on the network location of users if its possible to connect SQL Azure near to users.
So Logically would need to have SQL Azure database with global replication but not geo-replication as each copy would serve as Master and not secondary.
Thank you in advance.
You may want to try CosmosDB to distribute data globally and obtain low latency as explained on this article and this documentation.
For replicating data using SQL Data Sync with Azure SQL Database, take in consideration paired regions which may reduce latency. With SQL Data Sync a hub database can be defined and many member database on another region, and data can be synched on both ways between the hub and any member database.

Migrate Azure database server/database different region

Is there any way to migrate Azure SQL server/database from one geographical region to another region? Thanks.
You can use Geo-replication to create a replica of your actual databases on the new desired region, then you can failover all of them making databases on the new region the primary databases, now you can drop all secondary databases on the old original region. You can learn about setting up Geo-replication using Azure portal here.
Another option is to copy the databases to a server located on the desired region using the Copy Database feature as explained here.
A third option is exporting the database to a blob storage as bacpac then import it to a SQL Azure server on the new region as explained here.
Finally, you can also use SQL Data Sync (as explained here) to copy databases to the new region on a new server, and keep the servers synchronized, then you can remove databases from the sync groups, remove SQL Data Sync and drop the original databases.
Hope this helps.
The official Azure documentation about moving SQL resources across regions.

Geo-replicate between two regions

I know that by default geo-replicate is turned on for the azure service. However it only does so between two places within the same region. E.g. if I have chosen North Europe, the geo-replicate will be located in West Europe. Is it possible to so that I have the replication in US instead?
I want to make service such that my database can be located in two or more regions, such that the response time when accessing the database will be minimal. That is for a user in US he will access the database replica in US, while or a European user he will access the replica in Europe.
First, you should know that geo replication is turned on for Azure STORAGE service, not for any other Azure services yet. Then, you shall also be aware that this geo-replication is for disaster recovery mainly (and only as of today).
If you have to replicate a DB (Windows Azure SQL Database, a.k.a. WASD) you can use the SQL Data Sync - the only known way as of today to sync Azure Databases (either between different geo regions, or between Azure and on-premises).
There is not support for Windows Azure Cloud Service geo-replication. If you need to geographically distribute your application, you have to manage cloud service deployment across different data centers on your own.
If this is the case, for Azure storage, I would suggest using a single Storage service for WRITE operations, but Azure CDN for READ operations. Otherwise it might get too complicated. Of course the chosen architectural approach will depend on the requirements of the app (and expected load).
Then, you have to combine the different deployments with Azure Traffic Manager with a "Performance" algorithm setup.
EDIT (NOV 2014)
As of Q3 2014, Azure SQL Database also support Geo Replication. And Azure Data Sync is depricated and removed service. Azure Storage replication continue to be offered with 3 different flavours: Zone redundant, Geo redundant, Geo redundant with Read Access.
And still no option to replicate between Geographic Regions (i.e. from EU to US). Replication is still only an option between Geo Zone pairs (same geography).
I believe this is not possible today out of the box. You would need to do that on your own using data sync (for SQL Azure) and similar technologies (for Windows Azure Storage).

How can i change sql azure server location

I would like to transfer my existing SQL Azure location to other one, but I think there is no functionality right now to do so on the management portal of Azure.
I just googled it and found one link http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/e6c961cc-5eea-4f07-82c9-a8805d367b05 that says I need to use the data sync option in Azure's portal but I don't have that feature enabled in my Azure portal.
Also if I do use that option, is there any charge for it? Finally, are there any other option that is possible for moving the SQL Azure location?
To Move an Existing SQL Server Database to a New Region on Azure Assuming There Are No Blob Containers Associated With the Database. For further reference see:
https://azure.microsoft.com/en-us/blog/migrating-azure-services-to-new-regions/
Upgrade the database, if necessary, to one of the Premium pricing tiers
Add geo-replication to the existing database. You can choose what region to have the backup of the existing database. Create a new Database server in the target region of your choice. I suggest provisioning that new database server with the same admin username and password as the existing sql database. When creating the secondary database, I suggest making the Secondary type “Readable” as it will allow you the ability to check that all data and schemas were replicated correctly.
Allow the two databases time to sync. Rule of thumb according from Microsoft AzureCAT is: 3 * (5 minutes + database size / 150 MB/minute)
Configure the Firewall settings of the secondary database to allow the necessary IP addresses to access the database
Temporarily shut down whatever users or applications are accessing the existing database.
From the Azure portal select the existing database and change its geo-replication role from primary to secondary.
Run any ddl scripts that rely on the masterdb such as ddl scripts to recreate users and user profiles
Change the connection strings of any applications to point to the new database.
Users and applications can now connect to the new Database
At your discretion you can remove the old database as a backup and add any new regions as backup.
In terms of charges there will be charges for upgrading the old database if it isn't already a premium database. There will also be charges for creating the geo-replicated database. However, those charges can be limited to a day to a few days worth of fees (depending on how long geo-replication takes). Once the new database is up and running, delete the old database as soon as possible to limit additional fees. Finally, if you upgraded the service level of the old database to a premium tier to facilitate the geo-replication, you will want to downgrade the new database to the original service level of the old database to also limit fees.
I think you can use new Import/Export bacpac feature. I have used it to move databases between accounts and can't see why it wouldn't also work between regions.
See how here
If you are able to stop writes to the DB for a time then you can use the Copy feature on the Azure Portal.
Create a new SQL Server in the region of your choosing.
Add your service(s) IP addresses to the new SQL Server firewall.
Stop writes to the origin database.
Open the origin database in the Azure Portal and click Copy at the top of the blade.
Choose your new SQL server located in the destination region.
Wait for the copy to complete.
Update your service(s) to point to the destination DB.
Enable DB writes.
Verify everything is working.
Delete origin database (and server if it was the only DB on the server).
I wouldn't use DataSynch because it creates many objects in your database to perform synchronization (it's an invasive solution). You can indeed try the Import/Export feature; that should work fine. You can also download a trial version of the Enzo backup tool, which comes with a 30-day free trial: http://www.bluesyntax.net/backup.aspx. [disclaimer: I am the author of this tool]
Regarding the pricing question, you may be charged for data being extracted out of the database. Moving data "in" SQL Azure is free of charge for now. If you are transferring the data to a different data center, you will be charged for extracting the data. It's 15 cents per GB in the US and Europe, and 20 cents in Asia. Here are the pricing details: http://www.microsoft.com/windowsazure/pricing/
Keep in mind that a database that requires 4GB of storage doesn't mean you have 4GB of data. Sometimes indexes can take a lot of space. To estimate the size of the data you will need to transfer you can either drop your indexes (and wait a little for the database size to shrink; the database size should be roughly equal to your data transfer needs) or you can calculate the size of your tables by running a command. Here is a link to an article that shows how to do something similar (look at the second command with is a SELECT statement; just run it for all the tables): http://www.sqldocumentor.com/table-size-in-sql-server-find-rows-and-disk-space-usage
Azure has released a new tool called Azure Resource Mover.
Resource mover can for now handle these resources:
Azure VMs and associated disks
NICs
Availability sets
Azure virtual networks
Public IP addresses
Network security groups (NSGs)
Internal and public load balancers
Azure SQL databases and elastic pools
https://learn.microsoft.com/en-us/azure/resource-mover/move-region-within-resource-group
Azure SQL Server is not supported yet but Azure has a complete guide for this anyway:
https://learn.microsoft.com/en-us/azure/resource-mover/tutorial-move-region-sql#move-the-sql-server

Resources