Skip to content

Commit e723f2a

Browse files
authored
Merge pull request #22104 from MicrosoftDocs/main
5/16 PM Publishing
2 parents e246f16 + 9ee4ab6 commit e723f2a

7 files changed

Lines changed: 260 additions & 204 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title: "Bicep: Create a single database in Azure SQL Database"
3+
description: Create a single database in Azure SQL Database using Bicep.
4+
services: sql-database
5+
ms.service: sql-database
6+
ms.subservice: deployment-configuration
7+
ms.custom: subject-armqs sqldbrb=1, devx-track-azurepowershell, mode-arm
8+
ms.topic: quickstart
9+
author: schaffererin
10+
ms.author: v-eschaffer
11+
ms.date: 05/16/2022
12+
---
13+
14+
# Quickstart: Create a single database in Azure SQL Database using Bicep
15+
16+
Creating a [single database](single-database-overview.md) is the quickest and simplest option for creating a database in Azure SQL Database. This quickstart shows you how to create a single database using Bicep.
17+
18+
[Bicep](/azure/azure-resource-manager/bicep/overview?tabs=bicep) is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. It provides concise syntax, reliable type safety, and support for code reuse. Bicep offers the best authoring experience for your infrastructure-as-code solutions in Azure.
19+
20+
## Prerequisites
21+
22+
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/).
23+
24+
## Review the Bicep file
25+
26+
A single database has a defined set of compute, memory, IO, and storage resources using one of two [purchasing models](purchasing-models.md). When you create a single database, you also define a [server](logical-servers.md) to manage it and place it within [Azure resource group](/azure/active-directory-b2c/overview) in a specified region.
27+
28+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/sql-database/).
29+
30+
:::code language="bicep" source="~/../quickstart-templates/quickstarts/microsoft.sql/sql-database/main.bicep":::
31+
32+
The following resources are defined in the Bicep file:
33+
34+
- [**Microsoft.Sql/servers**](/azure/templates/microsoft.sql/servers)
35+
- [**Microsoft.Sql/servers/databases**](/azure/templates/microsoft.sql/servers/databases)
36+
37+
## Deploy the Bicep file
38+
39+
1. Save the Bicep file as **main.bicep** to your local computer.
40+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
41+
42+
# [CLI](#tab/CLI)
43+
44+
```azurecli
45+
az group create --name exampleRG --location eastus
46+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters administratorLogin=<admin-login>
47+
```
48+
49+
# [PowerShell](#tab/PowerShell)
50+
51+
```azurepowershell
52+
New-AzResourceGroup -Name exampleRG -Location eastus
53+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -administratorLogin "<admin-login>"
54+
```
55+
56+
---
57+
58+
> [!NOTE]
59+
> Replace **\<admin-login\>** with the administrator username of the SQL logical server. You'll be prompted to enter **administratorLoginPassword**.
60+
61+
When the deployment finishes, you should see a message indicating the deployment succeeded.
62+
63+
## Review deployed resources
64+
65+
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
66+
67+
# [CLI](#tab/CLI)
68+
69+
```azurecli-interactive
70+
az resource list --resource-group exampleRG
71+
```
72+
73+
# [PowerShell](#tab/PowerShell)
74+
75+
```azurepowershell-interactive
76+
Get-AzResource -ResourceGroupName exampleRG
77+
```
78+
79+
---
80+
81+
## Clean up resources
82+
83+
When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and its resources.
84+
85+
# [CLI](#tab/CLI)
86+
87+
```azurecli-interactive
88+
az group delete --name exampleRG
89+
```
90+
91+
# [PowerShell](#tab/PowerShell)
92+
93+
```azurepowershell-interactive
94+
Remove-AzResourceGroup -Name exampleRG
95+
```
96+
97+
---
98+
99+
## Next steps
100+
101+
- Create a server-level firewall rule to connect to the single database from on-premises or remote tools. For more information, see [Create a server-level firewall rule](firewall-create-server-level-portal-quickstart.md).
102+
- After you create a server-level firewall rule, [connect and query](connect-query-content-reference-guide.md) your database using several different tools and languages.
103+
- [Connect and query using SQL Server Management Studio](connect-query-ssms.md)
104+
- [Connect and query using Azure Data Studio](/sql/azure-data-studio/quickstart-sql-database?toc=%2fazure%2fsql-database%2ftoc.json)
105+
- To create a single database using the Azure CLI, see [Azure CLI samples](az-cli-script-samples-content-guide.md).
106+
- To create a single database using Azure PowerShell, see [Azure PowerShell samples](powershell-script-content-guide.md).
107+
- To learn how to create Bicep files, see [Create Bicep files with Visual Studio Code](/azure/azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code).

azure-sql/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@
301301
- name: Hyperscale
302302
displayName: Create Hyperscale database
303303
href: database/hyperscale-database-create-quickstart.md
304+
- name: Bicep
305+
displayName: ARM, Resource Manager, Template
306+
href: database/single-database-create-bicep-quickstart.md
304307
- name: ARM template
305308
displayName: Resource Manager
306309
href: database/single-database-create-arm-template-quickstart.md

docs/database-engine/install-windows/latest-updates-for-microsoft-sql-server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: A list of the latest cumulative updates and service packs, with build numbers for Microsoft SQL Server.
33
title: Latest updates for SQL Server
4-
ms.date: 04/18/2022
4+
ms.date: 05/16/2022
55
ms.prod: sql
66
ms.technology: install
77
ms.topic: conceptual
@@ -24,7 +24,7 @@ Each of the following links provides information for all of the applicable produ
2424

2525
|Product Versions | Latest Service Pack | Latest GDR | Latest cumulative update | CU Release Date | General Guidance |
2626
|--|--|--|--|--|--|
27-
|SQL Server 2019|N/A|[KB 4583458](https://support.microsoft.com/help/4583458)|CU 16 [(KB 5011644)](https://support.microsoft.com/help/5011644)|4/18/2022 <br/>(Windows)<br/><br/>5/10/2022 <br/>(Big Data Clusters)|[SQL Server 2019 Installation](./install-sql-server.md)|
27+
|SQL Server 2019|N/A|[KB 4583458](https://support.microsoft.com/help/4583458)|CU 16 [(KB 5011644)](https://support.microsoft.com/help/5011644)|4/18/2022 <br/>(Windows)<br/><br/>5/10/2022 <br/>(Big Data Clusters)<br/><br/>5/16/2022<br/>(Linux)|[SQL Server 2019 Installation](./install-sql-server.md)|
2828
|SQL Server 2017|N/A|[KB 4583456](https://support.microsoft.com/help/4583456)|CU 29 [(KB 5010786)](https://support.microsoft.com/help/5010786)|3/30/2022|[SQL Server 2017 Installation](./install-sql-server.md)|
2929
|SQL Server 2016|SP3 [(KB 5003279)](https://support.microsoft.com/help/5003279)|N/A|N/A|N/A|[SQL Server 2016 Installation](./install-sql-server.md)|
3030
|SQL Server 2016|SP2 [(KB 4052908)](https://support.microsoft.com/help/4052908)|[KB 4583460](https://support.microsoft.com/help/4583460)|CU 17 [(KB 5001092)](https://support.microsoft.com/kb/5001092)|3/29/2021|[SQL Server 2016 Installation](./install-sql-server.md)|
File renamed without changes.

0 commit comments

Comments
 (0)