Azure SQL: Archive a sql database before deleting - azure-sql-database

I have a number of sql databases in azure sql which I believe are no longer in use.
I'm planning on deleting them however, as a precaution, I would like to take some kind of backup or archive copies that I can quickly use to restore each database if necessary.
I've googled around but haven't found anything concrete. I found one mention of making a copy in a storage account so that it can be recovered but haven't been able to find how to do it - the copy command makes a copy of the database to another database. The "restore" option disappears after you remove a database.
The Database's in question are all less than 10mb in size.

Please consider using an export of the database as a bacpac to a cheap Blob Storage account.
On the Storage field on below image you can provide an existent Storage Account or create a new one.
If you need to recover one of those databases you just need to import them and specify the location of the bacpac you want to import.

You can export your Azure SQL database to the BACPAC backup files, store these backup file to Azure Blob Storage or your on-premise computer.
You can restore the your Azure SQL database from the bacpac files when you need.
Alberto Morllo provides the way about export the database to Blob Storage On Portal.
Beside this, there are many ways can help you do that, please reference:
Export to a BACPAC file using the SQLPackage utility;
Export to a BACPAC file using SQL Server Management Studio (SSMS)
Export to a BACPAC file using PowerShell
Get more details, please reference:
Quickstart: Import a BACPAC file to a database in Azure SQL Database
Export an Azure SQL database to a BACPAC file:
You can choose the way you like best.
Hope this helps.

Related

How to Create a bacPac file from PIT Azure SQL

I have a requirement to basically beable to 'tag' PIT restores as to hold for longer (and then later use the restore on demand), the only way i can think to do this is basically figure out a way to export the requested Point-in-Time restore to a bacpac and save it in Azure storage.
PIT restores as to hold for longer.
The Azure SQL Database service protects all databases with an automated backup system. These backups are retained for 7 days for Basic, 35 days for Standard and 35 days for Premium.
I can think to do this is basically figure out a way to export the requested Point-in-Time restore to a bacpac and save it in Azure storage.
These are two different approach. Either you restore a database from PIT or from bacpac file which is either stored in Azure Storage account or local machine.
You can't perform a Point-of-Time restore from bacpac file.
Refer Azure SQL Database Point in Time Restore and Export to a BACPAC file - Azure SQL Database to know more.

Move Azure SQL Database to new Azure Account

I want to move a large 1TB Azure database (PAAS) to a new Azure account. I am trying to use Export but that is going to result in a lot of downtime for the database.
Will upping the price tier currently P1 (DTU) improve export performance?
Yes, upgrading the service tier may improve the import/export performance.
Refer the official document to get better understanding.
Alternatively, You can easily Import and Export the database from one SQL Server to another in the same or different Azure Account using SQL Server Management Studio(SSMS).
Connect to source Azure accounts in SSMS.
Right click on the source database and do Tasks -> Export data tier application
Save as a .bacpac file to your local disk
Now connect to destination Azure accounts in SSMS.
Right click on Databases and select Import Data-tier Application
Select Import from local disk and browse for the .bacpac file saved in step 3
Configure the database settings (give database name and other required settings)
Import the database

My copy of Azure database seems to be synced with the original

I'm new to the subject but I needed a copy of an Azure database to try some improvements on views.
I managed to make the copy but now I notice that the data is synced, i.e. new data in the original database is also found in the copy.
I used the restore function of the Azure Portal. Just gave the database a name and executed.
Now I'm confused and reluctant to make any changes. Is this really a copy? I don't mind the sync but can it be switched off?
The Copy option of the portal does not keep the copy of the database in sync with the original database.
Another option you can do is to choose Export on the Azure portal menu for that database. It will export the database as a bacpac to an Azure Storage Account. After that you can import the bacpac and create a new Azure SQL Database from that bacpac or you can download that bacpac to a local computer and imported to a local SQL Server instance.
Although I was assured within my company that there is no test environment there was a server running and I happened to give the copy database wrong/right name.
For years this server was logging errors until a database popped up with the right name.
Sorry to confuse you all and myself.

Data movement from SQL on-premise to SQL Azure

I have migrated my database schema to SQL Azure, but I have huge(millions) data records to be migrated please suggest me an approach to move data
Approaches I have tried.
SQLAzureMW tool (but it takes 14 hours time, its not feasible for me)
Import export on SQL server(even this is taking time)
Any other approaches ..need help..!!
For large datasets you usually have to take a more imaginative approach to migration!
One possible approach is to take a full data backup. Ensuring that transaction logs are committed and cleared at the same time.
upload, or use Azure Import / Export to get the backup into Azure blob storage
syncronise your transaction logs with Azure blob storage
Create an Azure SQL database, import backup
replay transaction logs
Keep in sync with transaction logs until you are ready to switch over.
If 14 hours using SQLAzure Migration Wizard and your database is Azure compatible, you have 4 other choices:
export locally to BACPAC, upload BACPAC to Azure, and import BACPAC to Azure
export BACPAC directly to Azure and then import BACPAC to Azure
Use SSMS migration wizard with the most recent version of SSMS (includes a number of functional and performance enhancements)
Use SQL Server transaction replication - see additional requirements for this option. This last option enables you to incrementally migrate to SQL DB and then when SQL DB is current with your on-premise database, just cut your application(s) over to SQL DB with minimal downtime
For more information, see https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/#options-to-migrate-a-compatible-database-to-azure-sql-database

SQL Azure - Why is database size is much smaller when export and import to another database

Currently my SQL Azure database size is 8GB. When I export the database to a bacpac file, and then import the bacpac file to a new SQL Azure database, the size of the new database is around 2.5 GB
Thats a huge difference in the sizes for the same data.
Anybody knows why this could be happening?
(I'm using the automated backup feature in the web based Azure admin area at manage.windowsazure.com. And I use the import feature in the same admin area to import the newly created bacpac to a new database)
Thanks
Backup would not contain as much log information. As well, fragmentation could have made the database grow in size and backup/restore defragmented it.