Sql Server Databases - Create

Creates or replaces an Arc Sql Server Database.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}/databases/{databaseName}?api-version=2026-01-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

Name of the database

resourceGroupName
path True

string

The name of the Azure resource group

sqlServerInstanceName
path True

string

Name of SQL Server Instance

subscriptionId
path True

string

The ID of the Azure subscription

api-version
query True

string

The API version to use for the request

Request Body

Name Required Type Description
location True

string

The geo-location where the resource lives

properties True

SqlServerDatabaseResourceProperties

Properties of Arc Sql Server database

tags

object

Resource tags.

Responses

Name Type Description
200 OK

SqlServerDatabaseResource

OK

201 Created

SqlServerDatabaseResource

Created

Other Status Codes

ErrorResponse

*** Error Responses: ***

Examples

Create a Arc Sql Server database.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlServerInstances/testSqlServerInstance/databases/testdb?api-version=2026-01-01

{
  "location": "southeastasia",
  "tags": {
    "mytag": "myval"
  },
  "properties": {
    "collationName": "SQL_Latin1_General_CP1_CI_AS",
    "databaseCreationDate": "2022-04-05T16:26:33.883Z",
    "compatibilityLevel": 150,
    "state": "Online",
    "isReadOnly": true,
    "recoveryMode": "Full",
    "sizeMB": 150,
    "spaceAvailableMB": 100,
    "logFileSizeMB": 70,
    "dataFileSizeMB": 80,
    "databaseOptions": {
      "isAutoCloseOn": true,
      "isAutoShrinkOn": true,
      "isAutoCreateStatsOn": true,
      "isAutoUpdateStatsOn": true,
      "isMemoryOptimizationEnabled": true,
      "isRemoteDataArchiveEnabled": true,
      "isEncrypted": true,
      "isTrustworthyOn": true,
      "isHekatonFilesOn": false
    },
    "backupInformation": {
      "lastFullBackup": "2022-05-05T16:26:33.883Z",
      "lastLogBackup": "2022-05-10T16:26:33.883Z"
    },
    "backupPolicy": {
      "retentionPeriodDays": 1,
      "fullBackupDays": 1,
      "differentialBackupHours": 12,
      "transactionLogBackupMinutes": 30
    },
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/testSqlServerInstance/testsqlManagedInstance/databases/MyDatabase",
    "restorePointInTime": "2022-05-05T16:26:33.883Z"
  }
}

Sample response

{
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/testSqlServerInstance/testsqlManagedInstance/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.AzureArcData/sqlServerInstances/databases",
  "properties": {
    "collationName": "SQL_Latin1_General_CP1_CI_AS",
    "databaseCreationDate": "2022-04-05T16:26:33.883Z",
    "compatibilityLevel": 150,
    "state": "Online",
    "isReadOnly": true,
    "recoveryMode": "Full",
    "sizeMB": 150,
    "spaceAvailableMB": 100,
    "databaseOptions": {
      "isAutoCloseOn": true,
      "isAutoShrinkOn": true,
      "isAutoCreateStatsOn": true,
      "isAutoUpdateStatsOn": true,
      "isMemoryOptimizationEnabled": true,
      "isRemoteDataArchiveEnabled": true,
      "isEncrypted": true,
      "isTrustworthyOn": true,
      "isHekatonFilesOn": false
    },
    "backupInformation": {
      "lastFullBackup": "2022-05-05T16:26:33.883Z",
      "lastLogBackup": "2022-05-10T16:26:33.883Z"
    },
    "backupPolicy": {
      "retentionPeriodDays": 1,
      "fullBackupDays": 1,
      "differentialBackupHours": 12,
      "transactionLogBackupMinutes": 30
    },
    "earliestRestoreDate": "2022-05-10T16:26:33.883Z",
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/testSqlServerInstance/testsqlManagedInstance/databases/MyDatabase",
    "vmId": "12345678-1234-1234-1234-123456789123",
    "restorePointInTime": "2022-05-05T16:26:33.883Z"
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "tags": {
    "mytag": "myval"
  }
}
{
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/testSqlServerInstance/testsqlManagedInstance/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.AzureArcData/sqlServerInstances/databases",
  "properties": {
    "collationName": "SQL_Latin1_General_CP1_CI_AS",
    "databaseCreationDate": "2022-04-05T16:26:33.883Z",
    "compatibilityLevel": 150,
    "state": "Online",
    "isReadOnly": true,
    "recoveryMode": "Full",
    "sizeMB": 150,
    "spaceAvailableMB": 100,
    "databaseOptions": {
      "isAutoCloseOn": true,
      "isAutoShrinkOn": true,
      "isAutoCreateStatsOn": true,
      "isAutoUpdateStatsOn": true,
      "isMemoryOptimizationEnabled": true,
      "isRemoteDataArchiveEnabled": true,
      "isEncrypted": true,
      "isTrustworthyOn": true,
      "isHekatonFilesOn": false
    },
    "backupInformation": {
      "lastFullBackup": "2022-05-05T16:26:33.883Z",
      "lastLogBackup": "2022-05-10T16:26:33.883Z"
    },
    "backupPolicy": {
      "retentionPeriodDays": 1,
      "fullBackupDays": 1,
      "differentialBackupHours": 12,
      "transactionLogBackupMinutes": 30
    },
    "earliestRestoreDate": "2022-05-10T16:26:33.883Z",
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/testSqlServerInstance/testsqlManagedInstance/databases/MyDatabase",
    "vmId": "12345678-1234-1234-1234-123456789123",
    "restorePointInTime": "2022-05-05T16:26:33.883Z"
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "tags": {
    "mytag": "myval"
  }
}

Definitions

Name Description
BackupInformation
BackupPolicy

The backup profile for the SQL server.

Category
CostTypeValues

The Monthly cost of the particular SKU.

createdByType

The type of identity that created the resource.

DatabaseAssessments

Issues and warnings impacting the migration of Database to particular Azure Migration Target.

DatabaseCreateMode

Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified.

DataBaseMigration

Migration related configuration.

DataBaseMigrationAssessment

The migration assessment related configuration.

DatabaseOptions

List of features that are enabled for the database

DatabaseState

State of the database.

differentialBackupHours

The differential backup interval in hours.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ImpactedObjectsInfo

summary information about the incompatible feature id, number of objects impacted and category of issue (warning/error)

recommendationStatus

The target recommendation Status for this database.

RecoveryMode

Status of the database.

SkuRecommendationResultsMonthlyCost

The monthly cost of the particular SKU.

SkuRecommendationResultsMonthlyCostOptionItem

The monthly cost values for this saving option combination for the particular SKU.

SkuRecommendationSummary

The SKU recommendation summary.

SqlServerDatabaseResource

Arc Sql Server database

SqlServerDatabaseResourceProperties

The properties of Arc Sql Server database resource

systemData

Metadata pertaining to creation and last modification of the resource.

TargetReadiness

The target readiness for migration for this database.

TargetSku

BackupInformation

Name Type Description
lastFullBackup

string (date-time)

Date time of last full backup.

lastLogBackup

string (date-time)

Date time of last log backup.

BackupPolicy

The backup profile for the SQL server.

Name Type Description
differentialBackupHours

differentialBackupHours (int32)

The differential backup interval in hours.

fullBackupDays

integer (int32)

minimum: 0
maximum: 7

The value indicating days between full backups.

retentionPeriodDays

integer (int32)

minimum: 0
maximum: 35

The retention period for all the databases in this managed instance.

transactionLogBackupMinutes

integer (int32)

minimum: 0
maximum: 60

The value indicating minutes between transaction log backups.

Category

Name Type Description
computeTier

string

The compute tier of the target SKU.

hardwareType

string

The hardware type of the target SKU.

sqlPurchasingModel

string

The SQL purchasing model of the target SKU.

sqlServiceTier

string

The SQL service tier of the target SKU.

zoneRedundancyAvailable

boolean

Indicates if zone redundancy is available for the target SKU.

CostTypeValues

The Monthly cost of the particular SKU.

Name Type Description
computeCost

number (float)

Represents the Cost of Compute.

iopsCost

number (float)

Represents the Cost of IOPS.

storageCost

number (float)

Represents the Cost of Storage.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DatabaseAssessments

Issues and warnings impacting the migration of Database to particular Azure Migration Target.

Name Type Description
appliesToMigrationTargetPlatform

string

featureId

string

issueCategory

string

moreInformation

string

DatabaseCreateMode

Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified.

Value Description
Default
PointInTimeRestore

DataBaseMigration

Migration related configuration.

Name Type Description
assessment

DataBaseMigrationAssessment

Migration assessments related configuration.

DataBaseMigrationAssessment

The migration assessment related configuration.

Name Type Description
assessmentUploadTime

string (date-time)

The time when Migration Assessment Report upload was last performed.

databaseAssessments

DatabaseAssessments[]

Issues and warnings impacting the migration of Database to particular Azure Migration Target.

targetReadiness

TargetReadiness

The target readiness for migration for this database.

DatabaseOptions

List of features that are enabled for the database

Name Type Description
isAutoCloseOn

boolean

isAutoCreateStatsOn

boolean

isAutoShrinkOn

boolean

isAutoUpdateStatsOn

boolean

isEncrypted

boolean

isHekatonFilesOn

boolean

Whether the database uses the In-Memory OLTP feature for storing in-memory objects.

isMemoryOptimizationEnabled

boolean

isRemoteDataArchiveEnabled

boolean

isTrustworthyOn

boolean

numberOfHekatonFiles

number (int32)

How many Hekaton files the DB has on disk, if it uses in-memory OLTP objects.

DatabaseState

State of the database.

Value Description
Online
Restoring
Recovering
RecoveryPending
Suspect
Emergency
Offline
Copying
OfflineSecondary

differentialBackupHours

The differential backup interval in hours.

Value Description
12
24

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ImpactedObjectsInfo

summary information about the incompatible feature id, number of objects impacted and category of issue (warning/error)

Name Type Description
featureId

string

Represents the feature id from https://learn.microsoft.com/en-us/data-migration/sql-server/database/assessment-rules?view=azuresql. OR https://learn.microsoft.com/en-us/data-migration/sql-server/managed-instance/assessment-rules?view=azuresql

issueCategory

string

Issue or Warning

numberImpacted

number (int32)

Represents the number of issues/warnings.

recommendationStatus

The target recommendation Status for this database.

Value Description
NotReady
Ready
ReadyWithConditions
Unknown

RecoveryMode

Status of the database.

Value Description
Full
Bulk-logged
Simple

SkuRecommendationResultsMonthlyCost

The monthly cost of the particular SKU.

Name Type Description
computeCost

number (float)

Represents the Cost of Compute.

iopsCost

number (float)

Represents the Cost of IOPS.

sqlLicenseCost

number (float)

Represents the Cost of SQL license.

storageCost

number (float)

Represents the Cost of Storage.

totalCost

number (float)

Represents the Total Cost.

windowsLicenseCost

number (float)

Represents the Cost of Windows license.

SkuRecommendationResultsMonthlyCostOptionItem

The monthly cost values for this saving option combination for the particular SKU.

Name Type Description
keyName

string

The unique combination of saving options for a price e.g. With1YearASPAndProd.

keyValue

CostTypeValues

The Monthly cost of the particular SKU.

SkuRecommendationSummary

The SKU recommendation summary.

Name Type Description
impactedObjectsSummary

ImpactedObjectsInfo[]

summary information about the incompatible feature id, number of objects impacted and category of issue (warning/error)

monthlyCost

SkuRecommendationResultsMonthlyCost

The monthly cost of the particular SKU.

monthlyCostOptions

SkuRecommendationResultsMonthlyCostOptionItem[]

The monthly cost for all different savings options applicable for the particular SKU.

numOfBlockerIssues

integer (int32)

Number of blocker issues to fix before migrating this database to the target platform.

recommendationStatus

recommendationStatus

The target recommendation Status for this database.

targetSku

TargetSku

SqlServerDatabaseResource

Arc Sql Server database

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties

SqlServerDatabaseResourceProperties

Properties of Arc Sql Server database

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SqlServerDatabaseResourceProperties

The properties of Arc Sql Server database resource

Name Type Description
backupInformation

BackupInformation

backupPolicy

BackupPolicy

The backup profile for the SQL server.

collationName

string

Collation of the database.

compatibilityLevel

integer (int32)

minimum: 80
maximum: 200

Compatibility level of the database

createMode

DatabaseCreateMode

Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified.

dataFileSizeMB

number (float)

Total size in MB for the data (mdf and ndf) files for this database.

databaseCreationDate

string (date-time)

Creation date of the database.

databaseOptions

DatabaseOptions

List of features that are enabled for the database

earliestRestoreDate

string (date-time)

This records the earliest start date and time that restore is available for this database (ISO8601 format).

isReadOnly

boolean

Whether the database is read only or not.

lastDatabaseUploadTime

string (date-time)

The time when last successful database upload was performed.

logFileSizeMB

number (float)

Total size in MB for the log (ldf) files for this database.

migration

DataBaseMigration

Migration related configuration.

provisioningState

string

The provisioning state of the Arc-enabled SQL Server database resource.

recoveryMode

RecoveryMode

Status of the database.

restorePointInTime

string (date-time)

Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

sizeMB

number (float)

Size of the database.

sourceDatabaseId

string

The name of the source database associated with create operation of this database.

spaceAvailableMB

number (float)

Space left of the database.

state

DatabaseState

State of the database.

vmId

string

The unique ID of the hybrid machine that this resource belongs to.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TargetReadiness

The target readiness for migration for this database.

Name Type Description
azureSqlDatabase

SkuRecommendationSummary

The SKU recommendation summary.

azureSqlManagedInstance

SkuRecommendationSummary

The SKU recommendation summary.

azureSqlVirtualMachine

SkuRecommendationSummary

The SKU recommendation summary.

TargetSku

Name Type Description
category

Category

computeSize

number (int32)

Compute Size in vCores.

maxStorageIops

number (float)

The max storage IOPS in Azure SQL, will impact the billing cost.

maxThroughputMBps

number (float)

The max throughput in Azure SQL, will impact the billing cost.

predictedDataSizeInMb

number (float)

The predicted data size in MB in Azure SQL, will impact the billing cost.

predictedLogSizeInMb

number (float)

The predicted log size in MB in Azure SQL, will impact the billing cost.

storageMaxSizeInMb

number (float)

max storage for this particular SKU, in MB.