How can i change sql azure server location - azure

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

Related

How could I restore a Cosmos DB container if there is a periodic backup?

Is there a way to restore a Cosmos DB container after I accidentally deleted it? I just confused the live environment with a local Cosmos DB emulator.
When I go to the Settings - Backup & Restore it says:
Your account is on periodic backup mode. You can now change to continuous mode for a better backup and restore experience. Change to continuous mode
Does it mean that it is still somehow possible to revert the delete operation? But I can not find an option to revert the deletion.
For Cosmos DB containers configured with periodic backup (as you've mentioned is the case here), Microsoft has very prescriptive guidance on how to potentially restore the data. TL;DR - you should file a support request with the Microsoft Azure support team as soon as is feasible (being sure to include all information they need as indicated in the linked article). Their word choice in the linked document strongly indicates a time-sensitive aspect to this, and a relatively short window in which you need to lodge such a request to ensure the best possible outcome.
I've reproduced the relevant bits from the linked documentation below for convenience/posterity (emphases mine):
Request data restore from a backup
If you accidentally delete your
database or a container, you can file a support ticket or call the
Azure support to restore the data from automatic online backups. Azure
support is available for selected plans only such as Standard,
Developer, and plans higher than those. Azure support is not available
with Basic plan.
To restore a specific snapshot of the backup, Azure Cosmos DB requires
that the data is available during the backup cycle for that snapshot.
You should have the following details before requesting a restore:
Have your subscription ID ready.
Based on how your data was accidentally deleted or modified, you
should prepare to have additional information. It is advised that you
have the information available ahead to minimize the back-and-forth
that can be detrimental in some time sensitive cases.
If the entire Azure Cosmos DB account is deleted, you need to provide
the name of the deleted account. If you create another account with
the same name as the deleted account, share that with the support team
because it helps to determine the right account to choose. It's
recommended to file different support tickets for each deleted account
because it minimizes the confusion for the state of restore.
If one or more databases are deleted, you should provide the Azure
Cosmos DB account, and the Azure Cosmos DB database names and specify
if a new database with the same name exists.
If one or more containers are deleted, you should provide the Azure
Cosmos DB account name, database names, and the container names. And
specify if a container with the same name exists.
If you have accidentally deleted or corrupted your data, you should
contact Azure support within 8 hours so that the Azure Cosmos DB team
can help you restore the data from the backups. Before you create a
support request to restore the data, make sure to increase the backup
retention for your account to at least seven days. It’s best to
increase your retention within 8 hours of this event. This way the
Azure Cosmos DB support team will have enough time to restore your
account.
In addition to Azure Cosmos DB account name, database names, container
names, you should specify the point in time to which the data can be
restored to. It is important to be as precise as possible to help us
determine the best available backups at that time. It is also
important to specify the time in UTC.

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.

Is SQL Azure database backed up across datacenters by default?

I want to confirm our understanding of how our Azure SQL databases are being backed up to enable point in time restore. We have not currently configured geo-replication to have the database available in another region. We may in the future as some data analysis is done. But my understanding is that the database is still being backed up to a geo redundant location so I could do a geo-restore if there was an issue with the data center that houses my sql database. Is that correct or do I need to enable geo-replication and pay for a second database in order to have a disaster recover option if the datacenter had an issue.
To clarify further: I think this article states what I'm saying in the Geo-Restore section.
https://azure.microsoft.com/en-us/documentation/articles/sql-database-business-continuity/
Thanks
Yes, all databases have a geo-replicated copy for disaster recovery purposes. For more details, please see the following: https://azure.microsoft.com/en-us/blog/azure-sql-database-geo-restore/
Geo-restore uses the same technology as point in time restore with one
important difference. It restores the database from a copy of the most
recent daily backup in geo-replicated blob storage (RA-GRS). For each
active database, the service maintains a backup chain that includes a
weekly full backup, multiple daily differential backups, and
transaction logs saved every 5 minutes. These blobs are geo-replicated
this guarantees that daily backups are available even after a massive
failure in the primary region.
Yes, Azure SQL Databases are automatically backed up to a different Azure data center using Geo-Replication. This is an automatic features of Azure SQL that is baked into the service offering.
Here's a blog post with further information about Azure SQL Data Replication:
https://azure.microsoft.com/en-us/blog/azure-sql-database-standard-geo-replication/

Sitecore DMS in Azure

I've deployed the Sitecore on to Azure CD by using Sitecore Azure 3.0.0.
However, I'm not getting any analytics data until I manually update the "analytics" connection string to sql azure.
If anyone has already configured above, could you help me with queries below:
Is manual connection string the best solution? Or, am I missing any configuration setting for sitecore azure deploy.
Is it possible to Sync SQL Azure analytics to on-premise analytics db? We need this for disaster recovery i.e. to deploy all web,core,analytics to different data centre in event of disaster.
Does DMS slow down the performance of Sitecore CD?
Thanks.
You can add your "analytics" connection string to the connection string patch file defined in your Sitecore Azure config. Do this via the following steps:
Navigate to /sitecore/system/modules/Azure/[Environment]/[Region]/[Farm]/[Role]/[Deployment]
In the deployment item (e.g. Staging, Production), you should see a field named "Connection Strings Patch".
Scroll down in that field until you see the connection strings for the "core", "master", and "web" databases.
Add a connection string element for your "analytics" database. Be sure to use the connection string for the deployment item you're editing, i.e. use your Analytics staging connection string for the Staging item, production connection string for the Production item.
It is not recommended to use Azure SQL Data Sync for backup/disaster recovery (this recommendation is not specific to Sitecore). It is recommended to use a combination of Azure SQL database copying and then Azure SQL database export.
Also, Azure SQL Data Sync has limitations regarding the database schemas supported. SQL Data Sync is unable to synchronize any table that does not have a Primary Key (the Sitecore Analytics database has a few tables without primary keys).
Also, SQL Data Sync synchronizes only data but not stored procedures and triggers (the Sitecore Analytics database does have stored procedures).
Lastly, as your Analytics database grows, a sync operation is likely to take a significant amount of time to complete, whereas a copy operation will still take some time but likely not as much and will place less of a burden on your SQL server.
This MSDN article provides and overview of the copy/export process: http://msdn.microsoft.com/en-US/library/hh852669.aspx#adr3
This MSDN article provides details on how to copy Azure SQL databases: http://msdn.microsoft.com/library/ff951631.aspx
Yes, Sitecore content delivery server performance is impacted when DMS is enabled. To what extent largely depends on how you're using DMS (e.g. personalization, MV testing, engagement plans) and the amount of traffic your server receives.

SQL Azure failover / backup strategy for web app

I'm building a web app using Azure & SQL Azure. I'm setting it up so each organization has their own database. Low to moderate traffic per customer organization.
I'm thinking about using SQL Azure Data Sync as part of a failover/backup plan, so that if SQL Azure goes down, my app can switch over to my on-premises SQL Server (read-only mode).
I would also be able to do all of my backups on-prem, instead of in the cloud which could incur costs.
One issue may be trying to data-sync multiple databases to my on-prem
sql server (not sure what the limit is on the number of databases
that can be synced to one server)
Bandwidth may be an issue, but I'll probably only sync daily.
Does anyone see any other problems with this approach?
Data Sync is ok, but may or may not be good for your particular DR plan since it's not a transactional sync model.
One option to consider is making a database copy:
CREATE DATABASE destination_database_name
AS COPY OF [source_server_name.]source_database_name
Then you can create a backup from this copy, store the backup in blob storage, and (optionally) delete the database copy. While this does add an additional cost due to a second database being live, you can keep that cost to a minimum if you delete the database instance after creating a backup and storing to blob storage (remember that databases are amortized daily).
Since your backups would then be in blob storage, you could keep multiple backups in blob storage, and pull a backup to your on-premises server if needed.

Resources