Microsoft.Sql servers/databases 2014-04-01
Template format
To create a Microsoft.Sql/servers/databases resource, add the following JSON to the resources section of your template.
{
"name": "string",
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2014-04-01",
"location": "string",
"tags": {},
"properties": {
"collation": "string",
"createMode": "string",
"sourceDatabaseId": "string",
"sourceDatabaseDeletionDate": "string",
"restorePointInTime": "string",
"recoveryServicesRecoveryPointResourceId": "string",
"edition": "string",
"maxSizeBytes": "string",
"requestedServiceObjectiveId": "string",
"requestedServiceObjectiveName": "string",
"elasticPoolName": "string",
"readScale": "string",
"sampleName": "AdventureWorksLT",
"zoneRedundant": "boolean"
}
}
Property values
The following tables describe the values you need to set in the schema.
Microsoft.Sql/servers/databases object
Name | Type | Required | Value |
---|---|---|---|
name | string | Yes | The name of the database to be operated on (updated or created). |
type | enum | Yes | databases -or- Microsoft.Sql/servers/databases See Set name and type for child resources. |
apiVersion | enum | Yes | 2014-04-01 |
location | string | Yes | Resource location. |
tags | object | No | Resource tags. |
properties | object | Yes | The properties representing the resource. - DatabaseProperties object |
DatabaseProperties object
Name | Type | Required | Value |
---|---|---|---|
collation | string | No | The collation of the database. If createMode is not Default, this value is ignored. |
createMode | enum | No | 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. OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) 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, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - Copy, Default, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreLongTermRetentionBackup |
sourceDatabaseId | string | No | Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created. |
sourceDatabaseDeletionDate | string | No | Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted. |
restorePointInTime | string | No | Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value. |
recoveryServicesRecoveryPointResourceId | string | No | Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from. |
edition | enum | No | The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:az sql db list-editions -l <location> -o table Get-AzSqlServerServiceObjective -Location <location> . - Web, Business, Basic, Standard, Premium, PremiumRS, Free, Stretch, DataWarehouse, System, System2, GeneralPurpose, BusinessCritical, Hyperscale |
maxSizeBytes | string | No | The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." |
requestedServiceObjectiveId | string | No | The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API. - globally unique identifier |
requestedServiceObjectiveName | enum | No | The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:az sql db list-editions -l <location> -o table Get-AzSqlServerServiceObjective -Location <location> . - System, System0, System1, System2, System3, System4, System2L, System3L, System4L, Free, Basic, S0, S1, S2, S3, S4, S6, S7, S9, S12, P1, P2, P3, P4, P6, P11, P15, PRS1, PRS2, PRS4, PRS6, DW100, DW200, DW300, DW400, DW500, DW600, DW1000, DW1200, DW1000c, DW1500, DW1500c, DW2000, DW2000c, DW3000, DW2500c, DW3000c, DW6000, DW5000c, DW6000c, DW7500c, DW10000c, DW15000c, DW30000c, DS100, DS200, DS300, DS400, DS500, DS600, DS1000, DS1200, DS1500, DS2000, ElasticPool |
elasticPoolName | string | No | The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition. |
readScale | enum | No | Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. - Enabled or Disabled |
sampleName | enum | No | Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. - AdventureWorksLT |
zoneRedundant | boolean | No | Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Migrate to Azure SQL database using Azure DMS |
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 |
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 exising SQL Sever, storage account, and VNET. |
Deploy a HDInsight cluster and a SQL database |
This template allows you to create a HDInsight cluster and a SQL Database for testing Sqoop. |
Provision a Mobile App with a SQL Database |
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. |
Private Endpoint example |
This template shows how to create a private endpoint pointing to Azure SQL Server |
Remote Desktop Services with High Availability |
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. |
Create a SQL Server and Database |
This template allows you to create SQL Database and Server. |
Deploy a new SQL Elastic Pool |
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. |
Create Azure SQL Servers and Database with Failover Group |
Creates two Azure SQL servers, a database, and a failover group. |
Sonarqube Docker Web App on Linux with Azure SQL |
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. |
WebApp consuming a Azure SQL Private Endpoint |
This template shows how to create a Web app that consumes a private endpoint pointing to Azure SQL Server |
Azure SQL Server with Auditing written to Event Hub |
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 Analitics |
This template allows you to deploy an Azure SQL server with Auditing enabled to write audit logs to Log Analitics (OMS workspace) |
SQL Server SQL Data Warehouse with Transparent Encryption. |
Creates a SQL Server and a SQL Data Warehouse with Transparent Data Encryption. |
Provision a SQL Database with TDE |
This template provisions a SQL Server with firewall opened for Azure traffic and a SQL database with Transparent Data Encryption (TDE). |
Azure SQL Server + multiple SQL DBs with Threat Detection |
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 a Web App + Redis Cache + SQL DB with a template |
This template creates an Azure Web App with Redis cache and a SQL Database. |
Provision a Web App with a SQL Database |
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 |
Create and configure a Windows VM with SQL Azure database, and deploy web application to the environment using PowerShell DSC |
Web App with a SQL Database, Azure Cosmos DB, Azure Search |
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights. |
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks |
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 |
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. |
EPiserverCMS in Azure |
This template allows you to create resources required for EpiServerCMS deployment in Azure |
Autoscale LANSA Windows VM ScaleSet with Azure SQL Database |
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. |
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 |
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. |
Django App with SQL Databases |
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 |
Scalable Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |
Simple Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |