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).
![SQL Server Management]()
- 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.
![SQL Azure]()
- This will open the wizard. Click next on the introduction page and go to the deployment settings.
![Deployment settings]()
- The deployment settings page is used to deploy the database from local into Azure by using Azure credentials.
![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.
![Azure server name]()
- Click Next.
![Click next]()
- The summary page looks like the one below. After all the information is verified, click Finish.
![Finish]()
- It starts deploying now to Azure. Click the Close button to exit the wizard.
![Close button]()
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.
![Validating local 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.
![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.
![Microsoft Azure SQL]()