How to Create a SQL Database in Azure

Azure, Education, Microsoft, Technology

Using Azure, you can create a SQL Database in just a few seconds without having to worry about setting up the infrastructure or any related software. Additionally, Azure SQL databases allow you to connect using your preferred operating system, and programming language such as ADO.NET, Java, PHP, Node.js, Python, and Ruby.

You can easily create an SQL Database on Azure by following the steps below:

  1. Open your Azure portal and click on ‘Create a resource’Step1
  2. Select SQL Database from the optionsStep2
  3. The portal will provide you with a screen to enter details regarding the database to be created. Step3
  4. Enter the database name
  5. Select the subscription you would like to use for this database (Microsoft allows you to have multiple subscriptions under one user)
  6. Choose an existing resource group or create new resource group for this database to be a part of. (An Azure Resource Group is a way to group a set of resources together so that you can manage permissions, set alerts, develop deployment templates etc.)
  7. Select a source for the database – blank database, sample data set from Microsoft (good old AdventureWorks), or backup that you may have created previously.Step7
  8. Select Server and create a new server. Select a location for your server to be hosted. This can be based on where the majority of your transactions are going to be from. Step8
  9. Choose if you want to use SQL Elastic Pool (Adding a database to an elastic pool will allow that database to scale when there is a need. An elastic pool provides compute (eDTUs) and storage resources that are shared between all the databases it contains. Databases within a particular pool only use additional resources when they need them while making sure they don’t go over the limits specified by the user. This way elastic pools provide a simple and cost-effective solution for managing the performance of a database within a fixed budget.)
  10. Finally, select a Pricing tier for the database. Pricing is based on how many DTUs you expect your database to use. DTU stands for Database Transaction Unit, compute sizes for Azure databases are expressed in terms of DTUs for single databases and elasticDTUs (eDTUs) for elastic pools. To read more about DTU based Service Tiers read this. Step10
  11. Database collation defines the rules that sort and compare data. Collations provide the locale, code page, sort order and character sensitivity rules for character-based type data.  Azure currently supports 3800 database collations.
  12. Click on Create.
  13. Azure will start working on the deployment.
  14. You will receive a notification once the deployment is complete

Working with the newly created SQL DB:

You can click on ‘Go to Resource’ option within the notification to open the SQL database instance you just created.

Instance

There are a load of options you can play with on this screen. Two major options I would like to highlight are:

  1. Connect with Visual Studio: You can click on this option and open the database in your local Visual Studio to work on it.
  2. Geo-Replication: You can use this option to replicate your database across geographical locations if you have users accessing the database from multiple countries.

You can also delete the database you previously created from this screen by clicking on the ‘Delete’ option.

Delete DB


Leave a Reply

Your email address will not be published. Required fields are marked *