|
| 1 | +--- |
| 2 | +title: Free SQL Database with Azure free account |
| 3 | +description: Guidance on how to deploy an Azure SQL Database for free using an Azure free account. |
| 4 | +author: rajeshsetlem |
| 5 | +ms.author: rsetlem |
| 6 | +ms.service: sql-database |
| 7 | +ms.subservice: service-overview |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 02/25/2022 |
| 10 | +ms.custom: template-how-to |
| 11 | +--- |
| 12 | + |
| 13 | + |
| 14 | +# Try Azure SQL Database free with Azure free account |
| 15 | + |
| 16 | +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. |
| 17 | + |
| 18 | +Using an Azure free account, you can try Azure SQL Database for **free for 12 months** with the following **monthly limit**: |
| 19 | +- **1 S0 database with 10 database transaction units and 250 GB storage** |
| 20 | + |
| 21 | +This article shows you how to create and use an Azure SQL Database for free using an [Azure free account](https://azure.microsoft.com/free/). |
| 22 | + |
| 23 | + |
| 24 | +## Prerequisites |
| 25 | + |
| 26 | +To try Azure SQL Database for free, you need: |
| 27 | + |
| 28 | +- An Azure free account. If you don't have one, [create a free account](https://azure.microsoft.com/free/) before you begin. |
| 29 | + |
| 30 | + |
| 31 | +## Create a database |
| 32 | + |
| 33 | +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](./single-database-create-quickstart.md) or an [ARM template](./single-database-create-arm-template-quickstart.md). |
| 34 | + |
| 35 | +To create your database, follow these steps: |
| 36 | + |
| 37 | +1. Sign in to the [Azure portal](https://portal.azure.com/) with your Azure free account. |
| 38 | +1. Search for and select **SQL databases**: |
| 39 | + |
| 40 | + :::image type="content" source="./media/free-sql-db-free-account-how-to-deploy/search-sql-database.png" alt-text="Screenshot that shows how to search and select SQL database."::: |
| 41 | + |
| 42 | + Alternatively, you can search for and navigate to **Free Services**, and then select the **Azure SQL Database** tile from the list: |
| 43 | + |
| 44 | + :::image type="content" source="media/free-sql-db-free-account-how-to-deploy/free-services-sql-database.png" alt-text="Screenshot that shows a list of all free services on the Azure portal."::: |
| 45 | + |
| 46 | +1. Select **Create**. |
| 47 | +1. On the **Basics** tab of the **Create SQL Database** form, under **Project details**, select the free trial Azure **Subscription**. |
| 48 | +1. For **Resource group**, select **Create new**, enter *myResourceGroup*, and select **OK**. |
| 49 | +1. For **Database name**, enter *mySampleDatabase*. |
| 50 | +1. For **Server**, select **Create new**, and fill out the **New server** form with the following values: |
| 51 | + - **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 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. |
| 52 | + - **Server admin login**: Enter *azureuser*. |
| 53 | + - **Password**: Enter a password that meets complexity requirements, and enter it again in the **Confirm password** field. |
| 54 | + - **Location**: Select a location from the dropdown list. |
| 55 | + |
| 56 | + Select **OK**. |
| 57 | + |
| 58 | +1. Leave **Want to use SQL elastic pool** set to **No**. |
| 59 | +1. Under **Compute + storage**, select **Configure database**. |
| 60 | +1. 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**. |
| 61 | + |
| 62 | + :::image type="content" source="media/free-sql-db-free-account-how-to-deploy/configure-database.png" alt-text="Screenshot that shows selecting database service tier."::: |
| 63 | + |
| 64 | +1. Leave **Backup storage redundancy** set to **Geo-redundant backup storage** |
| 65 | +1. Select **Next: Networking** at the bottom of the page. |
| 66 | + |
| 67 | + :::image type="content" source="./media/free-sql-db-free-account-how-to-deploy/create-database-basics-tab.png" alt-text="New SQL database - Basic tab"::: |
| 68 | + |
| 69 | +1. On the **Networking** tab, for **Connectivity method**, select **Public endpoint**. |
| 70 | +1. 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**. |
| 71 | +1. Leave **Connection policy** set to **Default**. |
| 72 | +1. For **Encrypted Connections**, leave **Minimum TLS version** set to **TLS 1.2**. |
| 73 | +1. Select **Next: Security** at the bottom of the page. |
| 74 | + |
| 75 | + :::image type="content" source="./media/free-sql-db-free-account-how-to-deploy/create-database-networking-tab.png" alt-text="Networking tab"::: |
| 76 | + |
| 77 | +1. Leave the values unchanged on **Security** tab. |
| 78 | + |
| 79 | + |
| 80 | + :::image type="content" source="./media/free-sql-db-free-account-how-to-deploy/create-database-security-tab.png" alt-text="Security tab"::: |
| 81 | + |
| 82 | +1. Select **Next: Additional settings** at the bottom of the page. |
| 83 | +1. 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. |
| 84 | +1. Select **Review + create** at the bottom of the page. |
| 85 | + |
| 86 | + :::image type="content" source="./media/free-sql-db-free-account-how-to-deploy/create-database-additional-settings-tab.png" alt-text="Additional settings"::: |
| 87 | + |
| 88 | +1. On the **Review + create** page, after reviewing, select **Create**. |
| 89 | + |
| 90 | + > [!IMPORTANT] |
| 91 | + > 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**](#monitor-and-track-service-usage) later in this article. |
| 92 | + |
| 93 | +## Query the database |
| 94 | + |
| 95 | +Once your database is created, you can use the **Query editor (preview)** in the Azure portal to connect to the database and query data. |
| 96 | + |
| 97 | +1. In the portal, search for and select **SQL databases**, and then select your database from the list. |
| 98 | +1. On the page for your database, select **Query editor (preview)** in the navigation menu. |
| 99 | +1. Enter your server admin login information, and select **OK**. |
| 100 | + |
| 101 | + :::image type="content" source="./media/single-database-create-quickstart/query-editor-login.png" alt-text="Sign in to Query editor"::: |
| 102 | + |
| 103 | +1. Enter the following query in the **Query editor** pane. |
| 104 | + |
| 105 | + ```sql |
| 106 | + SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName |
| 107 | + FROM SalesLT.ProductCategory pc |
| 108 | + JOIN SalesLT.Product p |
| 109 | + ON pc.productcategoryid = p.productcategoryid; |
| 110 | + ``` |
| 111 | + |
| 112 | +1. Select **Run**, and then review the query results in the **Results** pane. |
| 113 | + |
| 114 | + :::image type="content" source="./media/single-database-create-quickstart/query-editor-results.png" alt-text="Query editor results"::: |
| 115 | + |
| 116 | +1. Close the **Query editor** page, and select **OK** when prompted to discard your unsaved edits. |
| 117 | + |
| 118 | +## Monitor and track service usage |
| 119 | + |
| 120 | +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. |
| 121 | + |
| 122 | + |
| 123 | +To track usage, follow these steps: |
| 124 | + |
| 125 | +1. In the Azure portal, search for **Subscriptions** and select the free trial subscription. |
| 126 | + |
| 127 | +1. On the **Overview** page, scroll down to see the tile **Top free services by usage**, and then select **View all free services**. |
| 128 | + |
| 129 | + :::image type="content" source="media/free-sql-db-free-account-how-to-deploy/free-services-usage-overview.png" alt-text="Screenshot that shows the Free Trial subscription overview page and highlights View all free services."::: |
| 130 | + |
| 131 | +1. Locate the meters related to **Azure SQL Database** to track usage. |
| 132 | + |
| 133 | + :::image type="content" source="media/free-sql-db-free-account-how-to-deploy/free-services-tracking.png" alt-text="Screenshot that shows the View and track usage information blade on Azure portal for all free services."::: |
| 134 | + |
| 135 | +The following table describes the values on the track usage page: |
| 136 | + |
| 137 | +| **Value**| **Description**| |
| 138 | +| ---- | ---------- | |
| 139 | +|**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. | |
| 140 | +| **Usage/limit** | The usage of the meter for the current month, and the limit for the meter. |
| 141 | +| **Status**| The current status of your usage of the service defined by the meter. The possible values for status are: </br> **Not in use**: You haven't used the meter or the usage for the meter hasn't reached the billing system. </br> **Exceeded on \<Date\>**: You've exceeded the limit for the meter on \<Date\>. </br> **Unlikely to Exceed**: You're unlikely to exceed the limit for the meter. </br>**Exceeds on \<Date\>**: You're likely to exceed the limit for the meter on \<Date\>. | |
| 142 | +| | | |
| 143 | + |
| 144 | +>[!IMPORTANT] |
| 145 | +> - 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. |
| 146 | +> - 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. |
| 147 | +> - For more information, see [**Azure free account FAQ**](https://azure.microsoft.com/free/free-account-faq/). |
| 148 | +
|
| 149 | +## Clean up resources |
| 150 | + |
| 151 | +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. |
| 152 | + |
| 153 | +To delete **myResourceGroup** and all its resources using the Azure portal: |
| 154 | + |
| 155 | +1. In the portal, search for and select **Resource groups**, and then select **myResourceGroup** from the list. |
| 156 | +1. On the resource group page, select **Delete resource group**. |
| 157 | +1. Under **Type the resource group name**, enter *myResourceGroup*, and then select **Delete**. |
| 158 | + |
| 159 | + |
| 160 | +## Next steps |
| 161 | + |
| 162 | +[Connect and query](connect-query-content-reference-guide.md) your database using different tools and languages: |
| 163 | +> [!div class="nextstepaction"] |
| 164 | +> [Connect and query using SQL Server Management Studio](connect-query-ssms.md) |
| 165 | +> |
| 166 | +> [Connect and query using Azure Data Studio](/sql/azure-data-studio/quickstart-sql-database?toc=/azure/sql-database/toc.json) |
| 167 | +
|
0 commit comments