Is there a way to simply take a SQL backup .bak file, and using that as a restore point to generate a new database on Azure SQL Database?
The wizard that I see generally recommended in this situation wants to create a custom file to use, but it pukes on the encrypted objects ( functions and views ) and I don't see another way to get it going.
Currently Azure doesn't support restoring the database on Azure SQL Instance using the backup (.bak) file. But there are many other ways to migrate the SQL Database to Azure SQL. For Example, using the SQL Server Management Studio deploy mention or by taking the backup in the .bacpac file and then importing it using SSMS Export/Import or using the Microsoft database migration assistance tool. Below link will be useful to you as they explain these ways as step by step process.
How to migrate SQL Database to Azure SQL Database using SSMS Export/Import
How to migrate SQL Database to Azure SQL Database using SSMS deploy
Migrating SQL Database To Azure SQL Instance using Microsoft Database Migration Assistant (DMA) Tool
Azure SQL Database does not currently support that functionality. The only method to restore in Azure SQL Database is import from BACPAC files - you can migrate to Azure SQL DB using BACPAC files by following this guide: https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/
The other options is to use SQL Server in a VM, which would enable a restore of a .bak file
To get my .BAK file on Azure SQL Server, I followed the advice of both answers in this thread.
Before completing the below steps the BAK file restore failed on my laptop SQL instance (the backups were from SQL2016 and not compatible with my SQL2014). I was working on training from EDX.org: “DAT216x Delivering a Relational Data Warehouse” and I had downloaded these two files from the training:
AdventureWorks2016CTP3.bak
andAdventureWorksDW2016CTP3.bak
.BAK to AzureDB
Deployment environments
@@servername @@version
Results
The Deploy Database to Azure failed in my scenario on the step
Importing database
with this message. After I removed the incompatible objects the Azure DB deployment was successful.Importing database...
Screenshot:
After I removed the incompatible object the Azure DB deployment was successful. (NOTE: I had to do this a couple times. I tried Redgate SQLSearch for
MEMORY_OPTIMIZED
but it kept saying "no search results" even though the table definition did include the keyword.)If you already have a database on local machine then you can migrate it directly on Azure using SQL Management Studio. Follow these steps:
Right click on the database name in SSMS:
Follow the wizard that appears then.
If you're running SSMS v17 you can configure the Azure SQL database edition, size and service objective.