Creating SQL Database In Azure And Connecting Through SQL Server Management Studio

We all know that without creating SQL database in Azure, we cannot connect it to SQL Server Management Studio. Therefore, let's create SQL database in Azure first.

Login to Azure portal, using the credential of your Subscription. Now, to create SQL database, go to New > Databases > SQL Databases, as shown below.
 
 
 
In SQL Database blade, provide the Information, as shown below.
  • Database Name- The name of the database, which you want to create.
  • Subscription- Choose your available Subscription.
  • Resource Group- Either use an existing resource group or create new one.
  • Select Source- Choose the database, which you want, Here, I choose Blank database.
  • Server- You can choose an existing database Server, if available, else create new one. I am creating new. To create New Server, do similar, as shown in the New Server Blade.
  • Pricing tier- Choose the size and price of the database, which is suitable for you.
  • Collation- Which one do you want.
Subsequently, pin it to dashboard for an easy access and click Create. It will take some time to deploy the database.
 
 
After database is successfully deployed, its wizard will open automatically, as shown below.
 
 
Now, SQL database has been successfully created in Azure. To connect it through SQL Server Management Studio, follow the steps, mentioned below.
 
We need to add client machine IP to the firewall so, go to Tools, as shown below.
 
 
Click open in Visual Studio, go to configure your Firewall. Firewall Setting blade will appear. Click Add Client IP and then Save, as shown below.
 
 
 
Now, open SQL Server Management Studio and provide the required Information.
  • Server Type Database Engine
  • Server Name- Enter the name that you created earlier in Azure.
  • Authentication SQL Server Authentication
  • Login Username that you set earlier, while creating a database in Azure.
  • Password- Password that you set earlier, while creating database in Azure.
Click Connect. 
 
 
 
You will be redirected to another preview, which appears, as shown below.
 
 

Congratulations! You have successfully created SQL database in Azure and connected it through SQL Server Management Studio. Keep coding and keep rocking.
Ebook Download
View all
Learn
View all