Sql Server Databases - Update
Updates an existing database.
PATCH 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 |
|---|---|---|---|---|
|
database
|
path | True |
string |
Name of the database |
|
resource
|
path | True |
string |
The name of the Azure resource group |
|
sql
|
path | True |
string |
Name of SQL Server Instance |
|
subscription
|
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 | Type | Description |
|---|---|---|
| properties |
The data controller's properties |
|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully updated the database. |
|
| 202 Accepted |
Resource update is in progress. Headers Location: string |
|
| Other Status Codes |
*** Error Responses: *** |
Examples
Update a database.
Sample request
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlServerInstances/testsqlManagedInstance/databases/testdb?api-version=2026-01-01
{
"tags": {
"mytag": "myval1"
}
}
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,
"logFileSizeMB": 70,
"dataFileSizeMB": 80,
"databaseOptions": {
"isAutoCloseOn": true,
"isAutoShrinkOn": true,
"isAutoCreateStatsOn": true,
"isAutoUpdateStatsOn": true,
"isMemoryOptimizationEnabled": true,
"isRemoteDataArchiveEnabled": true,
"isEncrypted": true,
"isTrustworthyOn": true,
"isHekatonFilesOn": true
},
"backupInformation": {
"lastFullBackup": "2022-05-05T16:26:33.883Z",
"lastLogBackup": "2022-05-10T16:26:33.883Z"
},
"backupPolicy": {
"retentionPeriodDays": 1,
"fullBackupDays": 1,
"differentialBackupHours": 12,
"transactionLogBackupMinutes": 30
},
"migration": {
"assessment": {
"assessmentUploadTime": "2024-03-15T00:14:52.0000000Z",
"databaseAssessments": [
{
"appliesToMigrationTargetPlatform": "AzureSqlDatabase",
"featureId": "ServiceBroker",
"issueCategory": "Issue",
"moreInformation": ""
}
],
"targetReadiness": {
"azureSqlDatabase": {
"numOfBlockerIssues": 0,
"recommendationStatus": "Ready"
},
"azureSqlManagedInstance": {
"numOfBlockerIssues": 0,
"recommendationStatus": "Ready"
},
"azureSqlVirtualMachine": {
"numOfBlockerIssues": 0,
"recommendationStatus": "Ready"
}
}
}
},
"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",
"lastDatabaseUploadTime": "2023-03-29T14:13:12Z"
},
"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": "myval1"
}
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.AzureArcData/operationResults/id1
Definitions
| Name | Description |
|---|---|
|
Backup |
|
|
Backup |
The backup profile for the SQL server. |
| Category | |
|
Cost |
The Monthly cost of the particular SKU. |
|
created |
The type of identity that created the resource. |
|
Database |
Issues and warnings impacting the migration of Database to particular Azure Migration Target. |
|
Database |
Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified. |
|
Data |
Migration related configuration. |
|
Data |
The migration assessment related configuration. |
|
Database |
List of features that are enabled for the database |
|
Database |
State of the database. |
|
differential |
The differential backup interval in hours. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Impacted |
summary information about the incompatible feature id, number of objects impacted and category of issue (warning/error) |
|
recommendation |
The target recommendation Status for this database. |
|
Recovery |
Status of the database. |
|
Sku |
The monthly cost of the particular SKU. |
|
Sku |
The monthly cost values for this saving option combination for the particular SKU. |
|
Sku |
The SKU recommendation summary. |
|
Sql |
Arc Sql Server database |
|
Sql |
The properties of Arc Sql Server database resource |
|
Sql |
An update to database resource. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Target |
The target readiness for migration for this database. |
|
Target |
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 |
differential |
The differential backup interval in hours. |
| fullBackupDays |
integer (int32) minimum: 0maximum: 7 |
The value indicating days between full backups. |
| retentionPeriodDays |
integer (int32) minimum: 0maximum: 35 |
The retention period for all the databases in this managed instance. |
| transactionLogBackupMinutes |
integer (int32) minimum: 0maximum: 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 |
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 |
Issues and warnings impacting the migration of Database to particular Azure Migration Target. |
|
| 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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
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 |
The Monthly cost of the particular SKU. |
SkuRecommendationSummary
The SKU recommendation summary.
| Name | Type | Description |
|---|---|---|
| impactedObjectsSummary |
summary information about the incompatible feature id, number of objects impacted and category of issue (warning/error) |
|
| monthlyCost |
The monthly cost of the particular SKU. |
|
| monthlyCostOptions |
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 |
The target recommendation Status for this database. |
|
| 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 |
Properties of Arc Sql Server database |
|
| 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 | ||
| backupPolicy |
The backup profile for the SQL server. |
|
| collationName |
string |
Collation of the database. |
| compatibilityLevel |
integer (int32) minimum: 80maximum: 200 |
Compatibility level of the database |
| createMode |
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 |
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 |
Migration related configuration. |
|
| provisioningState |
string |
The provisioning state of the Arc-enabled SQL Server database resource. |
| 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 |
State of the database. |
|
| vmId |
string |
The unique ID of the hybrid machine that this resource belongs to. |
SqlServerDatabaseUpdate
An update to database resource.
| Name | Type | Description |
|---|---|---|
| properties |
The data controller's properties |
|
| tags |
object |
Resource tags. |
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 |
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 |
The type of identity that last modified the resource. |
TargetReadiness
The target readiness for migration for this database.
| Name | Type | Description |
|---|---|---|
| azureSqlDatabase |
The SKU recommendation summary. |
|
| azureSqlManagedInstance |
The SKU recommendation summary. |
|
| azureSqlVirtualMachine |
The SKU recommendation summary. |
TargetSku
| Name | Type | Description |
|---|---|---|
| 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. |