Create a single database - Azure SQL Database (2024)

  • Article

In this quickstart, you create a single database in Azure SQL Database using either the Azure portal, a PowerShell script, or an Azure CLI script. You then query the database using Query editor in the Azure portal.

Watch this video in the Azure SQL Database essentials series for an overview of the deployment process:

Prerequisites

  • An active Azure subscription. If you don't have one, create a free account.
  • Much of this article can be accomplished with the Azure portal alone. Optionally, use the latest version of Azure PowerShell or Azure CLI.

Create a single database

This quickstart creates a single database in the serverless compute tier.

Note

Try Azure SQL Database free of charge and get 100,000 vCore seconds of serverless compute and 32 GB of storage every month.

  • Portal
  • Azure CLI
  • PowerShell

To create a single database in the Azure portal, this quickstart starts at the Azure SQL page.

  1. Browse to the Select SQL Deployment option page.

  2. Under SQL databases, leave Resource type set to Single database, and select Create.

  3. On the Basics tab of the Create SQL Database form, under Project details, select the desired Azure Subscription.

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

  5. For Database name, enter mySampleDatabase.

  6. 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 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.

    • Location: Select a location from the dropdown list.

    • Authentication method: Select Use SQL authentication.

    • Server admin login: Enter azureuser.

    • Password: Enter a password that meets requirements, and enter it again in the Confirm password field.

    Select OK.

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

  8. For Workload environment, specify Development for this exercise.

    The Azure portal provides a Workload environment option that helps to preset some configuration settings. These settings can be overridden. This option applies to the Create SQL Database portal page only. Otherwise, the Workload environment option has no impact on licensing or other database configuration settings.

    • Choosing the development workload environment sets a few options, including:
      • Backup storage redundancy option is locally redundant storage. Locally redundant storage incurs less cost and is appropriate for pre-production environments that do not require the redundance of zone- or geo-replicated storage.
      • Compute + storage is General Purpose, Serverless with a single vCore. By default, there is a one-hour auto-pause delay.
    • Choosing the Production workload environment sets:
      • Backup storage redundancy is geo-redundant storage, the default.
      • Compute + storage is General Purpose, Provisioned with 2 vCores and 32 GB of storage. This can be further modified in the next step.
  9. Under Compute + storage, select Configure database.

  10. This quickstart uses a serverless database, so leave Service tier set to General Purpose (Most budget-friendly, serverless compute) and set Compute tier to Serverless. Select Apply.

  11. Under Backup storage redundancy, choose a redundancy option for the storage account where your backups will be saved. To learn more, see backup storage redundancy.

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

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

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

    Create a single database - Azure SQL Database (3)

  15. Under Connection policy, choose the Default connection policy, and leave the Minimum TLS version at the default of TLS 1.2.

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

    Create a single database - Azure SQL Database (4)

  17. On the Security page, you can choose to start a free trial of Microsoft Defender for SQL, as well as configure Ledger, Managed identities and Transparent data encryption (TDE) if you desire. Select Next: Additional settings at the bottom of the page.

  18. On the Additional settings tab, in the Data source section, for Use existing data, select Sample. This creates an AdventureWorksLT sample database so there's some tables and data to query and experiment with, as opposed to an empty blank database. You can also configure database collation and a maintenance window.

  19. Select Review + create at the bottom of the page:

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

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. For more information, see Azure portal Query editor for Azure SQL Database.

  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 left menu.

  3. Enter your SQL authentication server admin login information or use Microsoft Entra authentication.

    Note

    Microsoft Entra ID was previously known as Azure Active Directory (Azure AD).

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

    SELECT TOP 20 pc.Name as CategoryName, p.name as ProductNameFROM SalesLT.ProductCategory pcJOIN SalesLT.Product pON pc.productcategoryid = p.productcategoryid;
  5. Select Run, and then review the query results in the Results pane.

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

Clean up resources

Keep the resource group, server, and single database to go on to the next steps, and learn how to connect and query your database with different methods.

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.

  • Portal
  • Azure CLI
  • PowerShell

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 step

Want to optimize and save on your cloud spending?

Start analyzing costs with Cost Management

Related content

  • Connect and query your database
  • Quickstart: Use SSMS to connect to and query Azure SQL Database or Azure SQL Managed Instance
  • Connect and query using Azure Data Studio
Create a single database - Azure SQL Database (2024)
Top Articles
7 Reasons Why Your Next Rug Should Be Wool | Catalina Rug
Financial Association | What To Know About Shared Finances
Netronline Taxes
J & D E-Gitarre 905 HSS Bat Mark Goth Black bei uns günstig einkaufen
Truist Park Section 135
Craigslist Furniture Bedroom Set
David Packouz Girlfriend
Tribune Seymour
270 West Michigan residents receive expert driver’s license restoration advice at last major Road to Restoration Clinic of the year
Bill Devane Obituary
Obituary Times Herald Record
Jscc Jweb
Keniakoop
Alejos Hut Henderson Tx
Five Day National Weather Forecast
Dit is hoe de 130 nieuwe dubbele -deckers -treinen voor het land eruit zien
Paradise leaked: An analysis of offshore data leaks
St Maries Idaho Craigslist
Buy Swap Sell Dirt Late Model
Metro Pcs.near Me
Exterior insulation details for a laminated timber gothic arch cabin - GreenBuildingAdvisor
Att.com/Myatt.
Breckie Hill Mega Link
Who is Jenny Popach? Everything to Know About The Girl Who Allegedly Broke Into the Hype House With Her Mom
Xfinity Outage Map Fredericksburg Va
Del Amo Fashion Center Map
Inkwell, pen rests and nib boxes made of pewter, glass and porcelain.
Relaxed Sneak Animations
Shiny Flower Belinda
Joann Fabrics Lexington Sc
Roseann Marie Messina · 15800 Detroit Ave, Suite D, Lakewood, OH 44107-3748 · Lay Midwife
Ofw Pinoy Channel Su
Cars And Trucks Facebook
B.k. Miller Chitterlings
Edict Of Force Poe
Vivek Flowers Chantilly
Babbychula
Ticket To Paradise Showtimes Near Marshall 6 Theatre
How To Upgrade Stamina In Blox Fruits
Complete List of Orange County Cities + Map (2024) — Orange County Insiders | Tips for locals & visitors
Infinite Campus Farmingdale
Royals Yankees Score
Valls family wants to build a hotel near Versailles Restaurant
Espn Top 300 Non Ppr
Used Sawmill For Sale - Craigslist Near Tennessee
Craigslist Sarasota Free Stuff
F9 2385
786 Area Code -Get a Local Phone Number For Miami, Florida
O.c Craigslist
Dumb Money Showtimes Near Regal Stonecrest At Piper Glen
What Responsibilities Are Listed In Duties 2 3 And 4
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 5821

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.