Introduction
In this article, we will discuss how to deploy a database from local to Azure using the deploy database to SQL Azure option in SQL Server.
Here, we are not using a .bak or .bacpac file. Rather, we are using the "deploy the database to SQL Azure" option in SQL Server.
Prerequisites
- Microsoft Azure account.
- SQL Server Management Studio.
Deploy Database from local to Azure
- Open and connect the database in SQL Server Management Studio (SSMS).
- To export a database file to Azure, right-click on the name of the database. In the context menu, select tasks > deploy the database to SQL Azure.
- This will open the wizard. Click next on the introduction page and go to the deployment settings.
- The deployment settings page is used to deploy the database from local into Azure by using Azure credentials.
- You need to give Azure server name, login, and password. You can also change the database name in the new database name textbox.
- Click Next.
- The summary page looks like the one below. After all the information is verified, click Finish.
- It starts deploying now to Azure. Click the Close button to exit the wizard.
Validating local database in Azure
Log into the Azure portal and in the left panel click on SQL databases and there you can see the database.
Note. If you are using SQL Server 2012, then in step 2, you need to select deploy the database to SQL Azure... option in SQL Server.
But if you are using any higher version of SQL Server like 2014 or 2016 then in step 2 you need to select deploy database to Microsoft Azure SQL database option in SQL Server.