You are on page 1of 11

9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

Try Azure SQL Database free with Azure


free account
Article • 01/09/2022 • 6 minutes to read

Azure SQL Database is an intelligent, scalable, relational database service built for the
cloud. SQL Database is a fully managed platform as a service (PaaS) database engine
that handles most database management functions such as upgrading, patching,
backups, and monitoring without user involvement.

Using an Azure free account, you can try Azure SQL Database for free for 12 months
with the following monthly limit:

1 S0 database with 10 database transaction units and 250 GB storage

This article shows you how to create and use an Azure SQL Database for free using an
Azure free account .

Prerequisites
To try Azure SQL Database for free, you need:

An Azure free account. If you don't have one, create a free account before you
begin.

Create a database
This article uses the Azure portal to create a SQL Database with public access.
Alternatively, you can create a SQL Database using PowerShell, the Azure CLI or an ARM
template.

To create your database, follow these steps:

1. Sign in to the Azure portal with your Azure free account.

2. Search for and select SQL databases:

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 1/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

Alternatively, you can search for and navigate to Free Services, and then select the
Azure SQL Database tile from the list:

3. Select Create.

4. On the Basics tab of the Create SQL Database form, under Project details, select
the free trial Azure Subscription.

5. For Resource group, select Create new, enter myResourceGroup, and select OK.

6. For Database name, enter mySampleDatabase.

7. For Server, select Create new, and fill out the New server form with the following
values:

Server name: Enter mysqlserver, and add some characters for uniqueness. We
can't provide an exact server name to use because server names must be

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 2/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

globally unique for all servers in Azure, not just unique within a subscription.
So enter something like mysqlserver12345, and the portal lets you know if
it's available or not.
Server admin login: Enter azureuser.
Password: Enter a password that meets complexity requirements, and enter it
again in the Confirm password field.
Location: Select a location from the dropdown list.

Select OK.

8. Leave Want to use SQL elastic pool set to No.

9. Under Compute + storage, select Configure database.

10. For the free trial, under Service Tier select Standard (For workloads with typical
performance requirements). Set DTUs to 10 and Data max size (GB) to 250, and
then select Apply.

11. Leave Backup storage redundancy set to Geo-redundant backup storage

12. Select Next: Networking at the bottom of the page.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 3/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

13. On the Networking tab, for Connectivity method, select Public endpoint.

14. For Firewall rules, set Allow Azure services and resources to access this server set
to Yes and set Add current client IP address to Yes.

15. Leave Connection policy set to Default.

16. For Encrypted Connections, leave Minimum TLS version set to TLS 1.2.

17. Select Next: Security at the bottom of the page.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 4/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

18. Leave the values unchanged on Security tab.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 5/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

19. Select Next: Additional settings at the bottom of the page.

20. On the Additional settings tab, in the Data source section, for Use existing data,
select Sample. This creates an AdventureWorksLT sample database so there are
some tables and data to query and experiment with, as opposed to an empty
blank database.

21. Select Review + create at the bottom of the page.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 6/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

22. On the Review + create page, after reviewing, select Create.

) Important

While creating the SQL Database from your Azure free account, you will still
see an Estimated cost per month in the Compute + Storage : Cost Summary
blade and Review + Create tab. But, as long as you are using your Azure free
account, and your free service usage is within monthly limits, you won't be
charged for the service. To view usage information, review Monitor and track
free services usage later in this article.

Query the database


Once your database is created, you can use the Query editor (preview) in the Azure
portal to connect to the database and query data.

1. In the portal, search for and select SQL databases, and then select your database
from the list.

2. On the page for your database, select Query editor (preview) in the navigation
menu.

3. Enter your server admin login information, and select OK.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 7/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

4. Enter the following query in the Query editor pane.

SQL

SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName


FROM SalesLT.ProductCategory pc
JOIN SalesLT.Product p
ON pc.productcategoryid = p.productcategoryid;

5. Select Run, and then review the query results in the Results pane.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 8/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

6. Close the Query editor page, and select OK when prompted to discard your
unsaved edits.

Monitor and track service usage


You are not charged for the Azure SQL Database included with your Azure free account
unless you exceed the free service limit. To remain within the limit, use the Azure portal
to track and monitor your free services usage.

To track usage, follow these steps:

1. In the Azure portal, search for Subscriptions and select the free trial subscription.

2. On the Overview page, scroll down to see the tile Top free services by usage, and
then select View all free services.

3. Locate the meters related to Azure SQL Database to track usage.

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 9/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

The following table describes the values on the track usage page:

Value Description

Meter Identifies the unit of measure for the service being consumed. For example, the
meter for Azure SQL Database is SQL Database, Single Standard, S0 DTUs, which
tracks the number of S0 databases used per day, and has a monthly limit of 1.

Usage/limit The usage of the meter for the current month, and the limit for the meter.

Status The current status of your usage of the service defined by the meter. The possible
values for status are:
Not in use: You haven't used the meter or the usage for the meter hasn't reached
the billing system.
Exceeded on <Date>: You've exceeded the limit for the meter on <Date>.
Unlikely to Exceed: You're unlikely to exceed the limit for the meter.
Exceeds on <Date>: You're likely to exceed the limit for the meter on <Date>.

) Important

With an Azure free account, you also get $200 in credit to use in 30 days.
During this time, any usage of the service beyond the free monthly amount is
deducted from this credit.
At the end of your first 30 days or after you spend your $200 credit
(whichever comes first), you'll only pay for what you use beyond the free
monthly amount of services. To keep getting free services after 30 days, move
to pay-as-you-go pricing. If you don't move to pay as you go, you can't
purchase Azure services beyond your $200 credit and eventually your account
and services will be disabled.
For more information, see Azure free account FAQ .

Clean up resources
https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 10/11
9/26/22, 4:21 PM Free SQL Database with Azure free account - Azure SQL Database | Microsoft Learn

When you're finished using these resources, you can delete the resource group you
created, which will also delete the server and single database within it.

To delete myResourceGroup and all its resources using the Azure portal:

1. In the portal, search for and select Resource groups, and then select
myResourceGroup from the list.
2. On the resource group page, select Delete resource group.
3. Under Type the resource group name, enter myResourceGroup, and then select
Delete.

Next steps
Connect and query your database using different tools and languages:

Connect and query using SQL Server Management Studio

Connect and query using Azure Data Studio

https://learn.microsoft.com/en-my/azure/azure-sql/database/free-sql-db-free-account-how-to-deploy?view=azuresql 11/11

You might also like