Azure Data Platform · Azure Services

Create New Azure SQL Database

In this blogpost, we would see how to create New SQL Database in Azure.

Prerequisite

  • Active Azure Subscription. If you don’t have, create a free account.
  • Subscription Level Contributor access or Owner access. we can check our Access in Subscriptions–>Access Control (IAM)–>View my Access. (like below)
Type Subscriptions in Global Search Resources Text Box
Check our Access at Subscription level

Create Azure SQL DB

Type Sql databases in Global Search Resources Text Box

Type Sql databases in Global Search Resources Text Box

Click ‘+Add‘ to create new Azure Single DB

Click ‘+Add‘ to create new Azure Single DB

Create SQL Database-Basics Tab

Create SQL Database-Basics

In Basics Tab, Choose Subscriptions.

Click Create new and give name in Resource group.

Give name in Database name.

Click Create new and give Server name [Server name + ‘.database.windows.net‘], Server admin login, Password, Confirm password, Location [eg., East US] in New Server Tab. Click OK.

Set Want to use SQL elastic pool as No.

Note –

Please make note that SQL Server is different from Server mentioned here. SQL Server is IaaS [Infrastructure as a Service] Option and Server here is just the logical grouping of Several SQL Databases where as Azure SQL DB (aka Single DB) is PaaS [Platform as a Service] Option.

Configure Edition & Pricing Tier

Configure Edition, Pricing Tier

Configure/Choose the required Edition [eg., Basic, Standard, Premium] and Pricing Tier [eg., Basic,S0,S1 etc.,]. we can also check the Estimated Cost/Month for the selected Editions as well as Pricing Tier. Click Review + create if we want to leave rest of the settings as default (or) click Next : Networking > to check, view, alter networking options.

Create SQL Database-Networking Tab

In Networking Tab, Choose the required Connectivity method or leave it as default (No access). Click Review + create if we want to leave rest of the settings as default (or) click Next : Additional settings > to check, view, alter more settings and options. Click < Previous to change any previous options.

Create SQL Database-Additional settings Tab

In Additional settings Tab, Choose the required Data source – use existing data [None(default), Backup, Sample]. Select required Database Collation or leave it as default (SQL_Latin1_General_CP1_CI_AS). For more Security, we can start trying Azure Defender for SQL. Click Review + create if we want to leave rest of the settings as default (or) click Next : Tags > to check, view, alter more settings and options. Click < Previous to change any previous options.

Create SQL Database-Tags Tab

Each Tag consists of a name and a value pair. We can apply ‘Tags‘ here to logically organize them into a taxonomy.

In Tags Tab, give Name-Value Pair. Click Review + create. Click < Previous, if we need to change any previous options.

Create SQL Database-Reviews + create Tab

After reviewing, select Create. Once it is created, we can get the success info in Notifications on the right top in Azure Portal. We can even click Download a template for automation to save this as JSON code.

Querying newly created Azure SQL DB

We can use whatever options that are comfortable for us to query the database like SSMS (SQL Server Management Studio), Azure Data Studio and Azure Portal’s Query Editor Options etc.,

Azure Portal – Query Editor

Add Firewall, Client IP for accessing Azure SQL DB

Error

Set server firewall (demotestserver0001)Cannot open server ‘demotestserver0001’ requested by the login. Client with IP address ‘157.49.218.xxx’ is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.

Solution

Check ADD and EDIT Client IP Address in Azure SQL DB that helps for accessing Azure SQL DB.

Azure Resource Lock

We can even apply Azure Resource Lock that prevents accidental deletions and modifying of the resources.

Summary

Thus, we saw how to create New SQL Database in Azure and other settings and options.

Follow Blog and Show your Support for many more interesting upcoming Posts!

Advertisement

4 thoughts on “Create New Azure SQL Database

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s