DEV Community

Kene Ojiteli
Kene Ojiteli

Posted on

Creating a database with Azure SQL database.

Azure SQL database is a fully-managed platform as a service (PAAS), that handles management functions such as patching, upgrading, backups, etc and gives an SLA of 99.99% availability.

In Azure SQL family, there are also other offerings / deployment options such as:

  • Azure SQL managed instance, a Platform As A Service.
  • SQL server on azure virtual machine - an Infrastructure As A Service.

This article is a walkthrough on creating a database with Azure SQL database and connecting to SQL Server Management Studio (an integrated environment for managing SQL infrastructure) to query the database.

Steps

  • Login to your azure account with an active subscription and navigate to azure SQL by using the search bar, then click on create SQL resource.

  • Select SQL database as deployment option, and single database as resource type (other resource types include elastic pool and database server)

SQL db deployment option

  • Click on create to configure the database, a summary of my configuration options:

  • Server details includes a server name, authentication method, admin login and password, where my database name is unique and my authentication method is SQL authentication.

Basic config
Networking

  • For data source, I choose the sample option so as to create a sample database (AdventureWorksLT).
    Additional settings

  • This deployment option created a server and a database among other resources.

Deployment progress

  • My server is online

Database Overview

  • To connect and query the database via the query editor or SSMS, a fire wall rule has to be configured on the server; this is done on the LHS, Security section =>networking (I am allowing just my public IP address to access my resources)

Adding firewall rule using my public IP

  • Using query editor, I logged in on the portal with my username and password.

Login with Query editor

  • Query the database with SQL commands.

sql commands

  • Another option is to connect Azure SQL db to SSMS (SSMS should already be installed on your machine), with server name, username, password and authentication method

SSMS login

Authentication

  • Connection is successful and some query has been done.

SQL server

Thank you for reading and I hope you learned something new.

Top comments (0)