Microsoft.Sql servers/databases 2020-08-01-preview

The servers/databases resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Sql/servers/databases resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Sql/servers/databases@2020-08-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: 'string'
  }
  properties: {
    autoPauseDelay: int
    catalogCollation: 'string'
    collation: 'string'
    createMode: 'string'
    elasticPoolId: 'string'
    highAvailabilityReplicaCount: int
    licenseType: 'string'
    longTermRetentionBackupResourceId: 'string'
    maintenanceConfigurationId: 'string'
    maxSizeBytes: int
    minCapacity: int
    readScale: 'string'
    recoverableDatabaseId: 'string'
    recoveryServicesRecoveryPointId: 'string'
    restorableDroppedDatabaseId: 'string'
    restorePointInTime: 'string'
    sampleName: 'string'
    secondaryType: 'string'
    sourceDatabaseDeletionDate: 'string'
    sourceDatabaseId: 'string'
    storageAccountType: 'string'
    zoneRedundant: bool
  }
}

Property values

servers/databases

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Sql/servers/databases'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2020-08-01-preview'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
location Resource location. string (required)
tags Resource tags. Dictionary of tag names and values. See Tags in templates
sku An ARM Resource SKU. Sku
properties The database's properties. DatabaseProperties

DatabaseProperties

Name Description Value
autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled int
catalogCollation Collation of the metadata catalog. 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation The collation of the database. string
createMode Specifies the mode of database creation.

Default: regular database creation.

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
'Copy'
'Default'
'OnlineSecondary'
'PointInTimeRestore'
'Recovery'
'Restore'
'RestoreExternalBackup'
'RestoreExternalBackupSecondary'
'RestoreLongTermRetentionBackup'
'Secondary'
elasticPoolId The resource identifier of the elastic pool containing this database. string
highAvailabilityReplicaCount The number of secondary replicas associated with the database that are used to provide high availability. int
licenseType The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit. 'BasePrice'
'LicenseIncluded'
longTermRetentionBackupResourceId The resource identifier of the long term retention backup associated with create operation of this database. string
maintenanceConfigurationId Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. string
maxSizeBytes The max size of the database expressed in bytes. int
minCapacity Minimal capacity that database will always have allocated, if not paused int
readScale The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. 'Disabled'
'Enabled'
recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database. string
recoveryServicesRecoveryPointId The resource identifier of the recovery point associated with create operation of this database. string
restorableDroppedDatabaseId The resource identifier of the restorable dropped database associated with create operation of this database. string
restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. string
sampleName The name of the sample schema to apply when creating this database. 'AdventureWorksLT'
'WideWorldImportersFull'
'WideWorldImportersStd'
secondaryType The secondary type of the database if it is a secondary. Valid values are Geo and Named. 'Geo'
'Named'
sourceDatabaseDeletionDate Specifies the time that the database was deleted. string
sourceDatabaseId The resource identifier of the source database associated with create operation of this database. string
storageAccountType The storage account type used to store backups for this database. 'GRS'
'LRS'
'ZRS'
zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. bool

Sku

Name Description Value
capacity Capacity of the particular SKU. int
family If the service has different generations of hardware, for the same SKU, then that can be captured here. string
name The name of the SKU, typically, a letter + Number code, e.g. P3. string (required)
size Size of the particular SKU string
tier The tier or edition of the particular SKU, e.g. Basic, Premium. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Django App with SQL Databases

Deploy to Azure
This template uses the Azure Linux CustomScript extension to deploy an application. This example creates an Ubuntu VM, does a silent install of Python, Django and Apache, then creates a simple Django app. The template also creates a SQL Database, with a sample table with some sample data which displayed in the web browser using a query
EPiserverCMS in Azure

Deploy to Azure
This template allows you to create resources required for EpiServerCMS deployment in Azure
Autoscale LANSA Windows VM ScaleSet with Azure SQL Database

Deploy to Azure
The template deploys a Windows VMSS with a desired count of VMs in the scale set and a LANSA MSI to install into each VM. Once the VM Scale Set is deployed a custom script extension is used to install the LANSA MSI)
Deploy Octopus Deploy 3.0 with a trial license.

Deploy to Azure
This template allows you to deploy a single Octopus Deploy 3.0 server with a trial license. This will deploy on a single Windows Server 2012R2 VM (Standard D2) and SQL DB (S1 tier) into the location specified for the Resource Group.
Orchard CMS Video Portal Web App

Deploy to Azure
This template provides a easy way to deploy Orchard CMS on Azure App Service Web Apps with the Azure Media Services module enabled and configured.
Scalable Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control.
eShop Website with ILB ASE

Deploy to Azure
An App Service Environment is a Premium service plan option of Azure App Service that provides a fully isolated and dedicated environment for securely running Azure App Service apps at high scale, including Web Apps, Mobile Apps, and API Apps.
WebApp consuming a Azure SQL Private Endpoint

Deploy to Azure
This template shows how to create a Web app that consumes a private endpoint pointing to Azure SQL Server
Remote Desktop Services with High Availability

Deploy to Azure
This ARM Template sample code will deploy a Remote Desktop Services 2019 Session Collection lab with high availability. The goal is to deploy a fully redundant, highly available solution for Remote Desktop Services, using Windows Server 2019.
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Migrate to Azure SQL database using Azure DMS

Deploy to Azure
The Azure Database Migration Service (DMS) is designed to streamline the process of migrating on-premises databases to Azure. DMS will simplify the migration of existing on-premises SQL Server and Oracle databases to Azure SQL Database, Azure SQL Managed Instance or Microsoft SQL Server in an Azure Virtual Machine. This template would deploy an instance of Azure Database Migration service, an Azure VM with SQL server installed on it which will act as a Source server with pre created database on it and a Target Azure SQL DB server which will have a pre-created schema of the database to be migrated from Source to Target server. The template will also deploy the required resources like NIC, vnet etc for supporting the Source VM, DMS service and Target server.
HDInsight with custom Ambari + Hive Metastore DB in VNET

Deploy to Azure
This template allows you to create an HDInsight cluster in an existing virtual network with a new SQL DB that serves as both a custom Ambari DB and Hive Metastore. You must have an existing SQL Sever, storage account, and VNET.
Deploy a HDInsight cluster and a SQL database

Deploy to Azure
This template allows you to create a HDInsight cluster and a SQL Database for testing Sqoop.
Private Endpoint example

Deploy to Azure
This template shows how to create a private endpoint pointing to Azure SQL Server
Azure SQL Server with Auditing written to Event Hub

Deploy to Azure
This template allows you to deploy an Azure SQL server with Auditing enabled to write audit logs to Event Hub
Azure SQL Server with Auditing written to Log Analytics

Deploy to Azure
This template allows you to deploy an Azure SQL server with Auditing enabled to write audit logs to Log Analytics (OMS workspace)
SQL Server SQL Data Warehouse with Transparent Encryption.

Deploy to Azure
Creates a SQL Server and a SQL Data Warehouse with Transparent Data Encryption.
Create a SQL Server and Database

Deploy to Azure
This template allows you to create SQL Database and Server.
Provision a SQL Database with TDE

Deploy to Azure
This template provisions a SQL Server with firewall opened for Azure traffic and a SQL database with Transparent Data Encryption (TDE).
Deploy a new SQL Elastic Pool

Deploy to Azure
This template allows you to deploy a new SQL Elastic Pool with its new associated SQL Server and new SQL Databases to assign to it.
Azure SQL Server + multiple SQL DBs with Threat Detection

Deploy to Azure
This template allows you to deploy an Azure SQL Server and a user-defined number of Azure SQL Databases with Threat Detection enabled, with an email address to receive alerts for each database.
Create Azure SQL Servers and Database with Failover Group

Deploy to Azure
Creates two Azure SQL servers, a database, and a failover group.
App Service Environment with Azure SQL backend

Deploy to Azure
This template creates an App Service Environment with an Azure SQL backend along with private endpoints along with associated resources typically used in an private/isolated environment.
Provision a Mobile App with a SQL Database

Deploy to Azure
This template provisions a Mobile App, SQL Database, and Notification Hub. It configures a connection string in the mobile app for the database and notification hub.
Create a Web App + Redis Cache + SQL DB with a template

Deploy to Azure
This template creates an Azure Web App with Redis cache and a SQL Database.
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Create, configure and deploy Web Application to an Azure VM

Deploy to Azure
Create and configure a Windows VM with SQL Azure database, and deploy web application to the environment using PowerShell DSC
Sonarqube Docker Web App on Linux with Azure SQL

Deploy to Azure
This template deploys Sonarqube in an Azure App Service web app Linux container using the official Sonarqube image and backed by an Azure SQL Server.