Deploying a SQL database to Azure with SQL Server Management Studio

Created by Maja Sæterstøen

This post shows how to deploy a database to Azure with SQL Server Management Studio.

Requirements:

  • Azure account with logical db-server
  • Latest version of SQL Server Managemnt Studio (SSMS)

 

1.) The first thing you need to do is connect SSMS to the source database. If you are using a local database you need to attach to the database.

2.) After you’ve connected to the database server, right-click on the database, click on Tasks, and select Deploy Database to Microsoft Azure SQL Database:

3.) The database deployment settings window will now open.

Enter the name of the new database, and click Connect

Enter the following settings:

Server name: 10 character server name followed by .database.windows.net.

Authentication: SQL Server Authentication

Login and password: Enter the login name and password you used when creating the Azure database server. 

Make sure to click on Options and check Encrypt connection if desired. (Under Options you can also browse existing dbs and choose to connect to one of them rather than create a new one. If you don’t want to do this, leave it at default.)

Click Connect.

4.) Specify the type of database you wish to create, and then click Next. You are taken to a summary of the intended actions. Confirm by clicking Finish.

Notes

  • If you wish to export the database as a .BACPAC file instead of deploying it, either to Azure or to keep locally, you can select Export Data-tier Application in step 2. This won’t be covered in this post, but is a fairly straightforward procedure.
  • If you wish to use an elastic pool with your database, you first need to create a regular Azure SQL db, and then convert it to use the elastic pool in the Azure portal, after the database has been successfully deployed.