Databases - Create Or Update

建立新的資料庫或更新現有的資料庫。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2014-04-01

URI 參數

名稱 位於 必要 類型 Description
databaseName
path True

string

要作的資料庫名稱(已更新或建立)。

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

識別 Azure 訂用帳戶的訂用帳戶標識碼。

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 類型 Description
parameters

Database

建立或更新資料庫的必要參數。

回應

名稱 類型 Description
200 OK

Database

還行

201 Created

Database

已建立

202 Accepted

已接受

範例

Create a database as a copy
Create a database as a dropped database restore to a specific point in time
Create a database as a dropped database restore to deletion time
Create a database as a geo restore
Create a database as a non-readable secondary
Create a database as a point in time restore
Create a database as an online secondary
Create a database from a long term retention backup
Create a database max
Create a database min
Update a database's elastic pool'
Update a database max

Create a database as a copy

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "Copy",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a dropped database restore to a specific point in time

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "Restore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/restorableDroppedDatabases/sourcedb,131403269876900000",
    "restorePointInTime": "2017-05-20T21:24:37.467Z"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a dropped database restore to deletion time

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "Restore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/sourcedb",
    "sourceDatabaseDeletionDate": "2017-05-27T02:49:47.69Z"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a geo restore

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "Recovery",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/recoverableDatabases/sourcedb"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a non-readable secondary

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "NonReadableSecondary",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a point in time restore

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
    "restorePointInTime": "2017-02-16T21:24:37.467Z"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as an online secondary

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "OnlineSecondary",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database from a long term retention backup

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "createMode": "RestoreLongTermRetentionBackup",
    "recoveryServicesRecoveryPointResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/AzureSqlContainer;Sql;sqlcrudtest-8412;testsvr/protectedItems/AzureSqlDb;dsName;testdb;9dafcc99-7c84-4727-88ee-1a4fdb89afd7/RecoveryPoints/16043455089734"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database max

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "containmentState": 2,
    "readScale": "Disabled",
    "sampleName": "AdventureWorksLT"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-8931/providers/Microsoft.Sql/servers/sqlcrudtest-1932/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "sourceDatabaseId": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-8931/providers/Microsoft.Sql/servers/sqlcrudtest-1932/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "sourceDatabaseId": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database min

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East"
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Update a database's elastic pool'

範例要求

PUT https://management.azure.com/subscriptions/9d4e2ad0-e20b-4464-9219-353bded52513/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb?api-version=2014-04-01

{
  "properties": {
    "elasticPoolName": "7537"
  },
  "location": "Japan East"
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Update a database max

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb?api-version=2014-04-01

{
  "location": "Japan East",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "containmentState": 2,
    "readScale": "Disabled"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

定義

名稱 Description
CreateMode

指定資料庫建立模式。

默認值:定期建立資料庫。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

OnlineSecondary/NonReadableSecondary:建立資料庫做為現有資料庫的次要複本(可讀取或不可讀取的)。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為要還原的可復原資料庫資源標識符。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定為從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、NonReadableSecondary、OnlineSecondary 和 RestoreLongTermRetentionBackup。

Database

表示資料庫。

DatabaseEdition

資料庫的版本。 DatabaseEditions 列舉包含所有有效的版本。 如果 createMode 為 NonReadableSecondary 或 OnlineSecondary,則會忽略此值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
OperationImpact

執行建議索引動作的估計影響。

ReadScale

有條件的。 如果資料庫是異地輔助資料庫,readScale 會指出是否允許此資料庫的唯讀連線。 DataWarehouse 版本不支援。

RecommendedIndex

此資料庫的建議索引。

RecommendedIndexAction

建議的索引動作。 您可以建立遺漏的索引、卸除未使用的索引,或重建現有的索引以改善其效能。

RecommendedIndexState

目前的建議狀態。

RecommendedIndexType

索引的類型(CLUSTERED、NONCLUSTERED、COLUMNSTORE、CLUSTERED COLUMNSTORE)

SampleName

指出建立這個資料庫時要套用的範例架構名稱。 如果 createMode 不是 Default,則會忽略此值。 DataWarehouse 版本不支援。

ServiceObjectiveName

資料庫所設定服務等級目標的名稱。 這是在套用至資料庫的過程中的服務等級目標。 成功更新之後,它會比對 serviceLevelObjective 屬性的值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
ServiceTierAdvisor

此資料庫的服務層級建議程式清單。 展開的屬性

SloUsageMetric

取得或設定 Service Tier Advisor 的 serviceLevelObjectiveUsageMetrics。

TransparentDataEncryption

此資料庫的透明數據加密資訊。

TransparentDataEncryptionStatus

資料庫透明數據加密的狀態。

CreateMode

指定資料庫建立模式。

默認值:定期建立資料庫。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

OnlineSecondary/NonReadableSecondary:建立資料庫做為現有資料庫的次要複本(可讀取或不可讀取的)。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為要還原的可復原資料庫資源標識符。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定為從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、NonReadableSecondary、OnlineSecondary 和 RestoreLongTermRetentionBackup。

Description
Copy
Default
NonReadableSecondary
OnlineSecondary
PointInTimeRestore
Recovery
Restore
RestoreLongTermRetentionBackup

Database

表示資料庫。

名稱 類型 Description
id

string

資源標識碼。

kind

string

資料庫種類。 這是用於 Azure 入口網站體驗的元數據。

location

string

資源位置。

name

string

資源名稱。

properties.collation

string

資料庫的定序。 如果 createMode 不是 Default,則會忽略此值。

properties.containmentState

integer (int64)

資料庫的內含項目狀態。

properties.createMode

CreateMode

指定資料庫建立模式。

默認值:定期建立資料庫。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

OnlineSecondary/NonReadableSecondary:建立資料庫做為現有資料庫的次要複本(可讀取或不可讀取的)。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為要還原的可復原資料庫資源標識符。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定為從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、NonReadableSecondary、OnlineSecondary 和 RestoreLongTermRetentionBackup。

properties.creationDate

string (date-time)

資料庫的建立日期(ISO8601格式)。

properties.currentServiceObjectiveId

string (uuid)

資料庫的目前服務等級目標標識碼。 這是目前作用中之服務等級目標的標識符。

properties.databaseId

string (uuid)

資料庫的標識碼。

properties.defaultSecondaryLocation

string

這個資料庫的預設次要區域。

properties.earliestRestoreDate

string (date-time)

這會記錄此資料庫最早的開始日期和時間(ISO8601格式)。

properties.edition

DatabaseEdition

資料庫的版本。 DatabaseEditions 列舉包含所有有效的版本。 如果 createMode 為 NonReadableSecondary 或 OnlineSecondary,則會忽略此值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
properties.elasticPoolName

string

資料庫位於的彈性集區名稱。 如果 elasticPoolName 和 requestedServiceObjectiveName 都已更新,則會忽略 requestedServiceObjectiveName 的值。 DataWarehouse 版本不支援。

properties.failoverGroupId

string

包含此資料庫的故障轉移群組資源標識碼。

properties.maxSizeBytes

string

以位元組表示的資料庫大小上限。 如果 createMode 不是 Default,則會忽略此值。 若要查看可能的值,請查詢 operationId 所參考的功能 API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities):“Capabilities_ListByLocation”。

properties.readScale

ReadScale

有條件的。 如果資料庫是異地輔助資料庫,readScale 會指出是否允許此資料庫的唯讀連線。 DataWarehouse 版本不支援。

properties.recommendedIndex

RecommendedIndex[]

此資料庫的建議索引。

properties.recoveryServicesRecoveryPointResourceId

string

有條件的。 如果 createMode 為 RestoreLongTermRetentionBackup,則需要此值。 指定要從中還原之恢復點的資源標識碼。

properties.requestedServiceObjectiveId

string (uuid)

資料庫已設定的服務等級目標標識碼。 這是在套用至資料庫的過程中的服務等級目標。 成功更新之後,它會比對 currentServiceObjectiveId 屬性的值。 如果同時更新 requestedServiceObjectiveId 和 requestedServiceObjectiveName,requestedServiceObjectiveId 的值會覆寫 requestedServiceObjectiveName 的值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的服務目標標識碼,請使用 Capabilities_ListByLocation REST API。

properties.requestedServiceObjectiveName

ServiceObjectiveName

資料庫所設定服務等級目標的名稱。 這是在套用至資料庫的過程中的服務等級目標。 成功更新之後,它會比對 serviceLevelObjective 屬性的值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
properties.restorePointInTime

string (date-time)

有條件的。 如果 createMode 是 PointInTimeRestore,則需要此值。 如果 createMode 為 Restore,這個值是選擇性的。 指定要還原以建立新資料庫的源資料庫的時間點(ISO8601格式)。 必須大於或等於源資料庫的最早RestoreDate 值。

properties.sampleName

SampleName

指出建立這個資料庫時要套用的範例架構名稱。 如果 createMode 不是 Default,則會忽略此值。 DataWarehouse 版本不支援。

properties.serviceLevelObjective

ServiceObjectiveName

資料庫目前的服務等級目標。

properties.serviceTierAdvisors

ServiceTierAdvisor[]

此資料庫的服務層級建議程式清單。 展開的屬性

properties.sourceDatabaseDeletionDate

string (date-time)

有條件的。 如果 createMode 為 Restore,且 sourceDatabaseId 是已刪除的資料庫原始資源標識符,當它存在時,它就會成為已刪除的資料庫標識碼(與其目前可還原的已卸除資料庫標識符相反),則需要此值。 指定刪除資料庫的時間。

properties.sourceDatabaseId

string

有條件的。 如果 createMode 為 Copy、NonReadableSecondary、OnlineSecondary、PointInTimeRestore、Recovery 或 Restore,則需要此值。 指定源資料庫的資源識別碼。 如果 createMode 為 NonReadableSecondary 或 OnlineSecondary,源資料庫的名稱必須與所建立的新資料庫相同。

properties.status

string

資料庫的狀態。

properties.transparentDataEncryption

TransparentDataEncryption[]

此資料庫的透明數據加密資訊。

properties.zoneRedundant

boolean

此資料庫是否為區域備援,這表示此資料庫的複本會分散到多個可用性區域。

tags

object

資源標籤。

type

string

資源類型。

DatabaseEdition

資料庫的版本。 DatabaseEditions 列舉包含所有有效的版本。 如果 createMode 為 NonReadableSecondary 或 OnlineSecondary,則會忽略此值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
Description
Web
Business
Basic
Standard
Premium
PremiumRS
Free
Stretch
DataWarehouse
System
System2
GeneralPurpose
BusinessCritical
Hyperscale

OperationImpact

執行建議索引動作的估計影響。

名稱 類型 Description
changeValueAbsolute

number (double)

維度的絕對影響。

changeValueRelative

number (double)

維度的相對影響(如果不適用則為 null)

name

string

影響維度的名稱。

unit

string

測量維度預估影響所在的單位。

ReadScale

有條件的。 如果資料庫是異地輔助資料庫,readScale 會指出是否允許此資料庫的唯讀連線。 DataWarehouse 版本不支援。

Description
Enabled
Disabled

RecommendedIndex

此資料庫的建議索引。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.action

RecommendedIndexAction

建議的索引動作。 您可以建立遺漏的索引、卸除未使用的索引,或重建現有的索引以改善其效能。

properties.columns

string[]

要建置索引的數據行

properties.created

string (date-time)

顯示此資源建立時間的 UTC 日期時間(ISO8601格式)。

properties.estimatedImpact

OperationImpact[]

執行建議索引動作的估計影響。

properties.includedColumns

string[]

要包含在索引中的數據行名稱清單

properties.indexScript

string

完整組建索引腳本

properties.indexType

RecommendedIndexType

索引的類型(CLUSTERED、NONCLUSTERED、COLUMNSTORE、CLUSTERED COLUMNSTORE)

properties.lastModified

string (date-time)

上次變更此資源的 UTC 日期時間(ISO8601格式)。

properties.reportedImpact

OperationImpact[]

索引動作完成之後所報告的值。

properties.schema

string

要在其中建置索引的架構

properties.state

RecommendedIndexState

目前的建議狀態。

properties.table

string

要建置索引的數據表。

type

string

資源類型。

RecommendedIndexAction

建議的索引動作。 您可以建立遺漏的索引、卸除未使用的索引,或重建現有的索引以改善其效能。

Description
Create
Drop
Rebuild

RecommendedIndexState

目前的建議狀態。

Description
Active
Pending
Executing
Verifying
Pending Revert
Reverting
Reverted
Ignored
Expired
Blocked
Success

RecommendedIndexType

索引的類型(CLUSTERED、NONCLUSTERED、COLUMNSTORE、CLUSTERED COLUMNSTORE)

Description
CLUSTERED
NONCLUSTERED
COLUMNSTORE
CLUSTERED COLUMNSTORE

SampleName

指出建立這個資料庫時要套用的範例架構名稱。 如果 createMode 不是 Default,則會忽略此值。 DataWarehouse 版本不支援。

Description
AdventureWorksLT

ServiceObjectiveName

資料庫所設定服務等級目標的名稱。 這是在套用至資料庫的過程中的服務等級目標。 成功更新之後,它會比對 serviceLevelObjective 屬性的值。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 Azure 區域中訂用帳戶可用的 SKU(包括 SKU 名稱、層/版本、系列和容量),請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
Description
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

ServiceTierAdvisor

此資料庫的服務層級建議程式清單。 展開的屬性

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.activeTimeRatio

number (double)

適用於服務層建議程式的 activeTimeRatio。

properties.avgDtu

number (double)

取得或設定服務層建議程式的avgDtu。

properties.confidence

number (double)

取得或設定服務層級建議程式的信心。

properties.currentServiceLevelObjective

string

取得或設定服務層級建議程式目前的ServiceLevelObjective。

properties.currentServiceLevelObjectiveId

string (uuid)

取得或設定服務層級建議程式目前的ServiceLevelObjectiveId。

properties.databaseSizeBasedRecommendationServiceLevelObjective

string

取得或設定服務層級建議程序的資料庫SizeBasedRecommendationServiceLevelObjective。

properties.databaseSizeBasedRecommendationServiceLevelObjectiveId

string (uuid)

取得或設定服務層級建議程序的資料庫SizeBasedRecommendationServiceLevelObjectiveId。

properties.disasterPlanBasedRecommendationServiceLevelObjective

string

取得或設定 service tier Advisor 的 disasterPlanBasedRecommendationServiceLevelObjective。

properties.disasterPlanBasedRecommendationServiceLevelObjectiveId

string (uuid)

取得或設定 service tier Advisor 的 disasterPlanBasedRecommendationServiceLevelObjectiveId。

properties.maxDtu

number (double)

取得或設定服務層建議程式的最大Dtu。

properties.maxSizeInGB

number (double)

取得或設定 Service Tier Advisor 的 maxSizeInGB。

properties.minDtu

number (double)

取得或設定服務層建議程式 minDtu。

properties.observationPeriodEnd

string (date-time)

觀察期間開始(ISO8601格式)。

properties.observationPeriodStart

string (date-time)

觀察期間開始(ISO8601格式)。

properties.overallRecommendationServiceLevelObjective

string

取得或設定服務層級建議程序的整體RecommendationServiceLevelObjective。

properties.overallRecommendationServiceLevelObjectiveId

string (uuid)

取得或設定服務層級建議程序的整體RecommendationServiceLevelObjectiveId。

properties.serviceLevelObjectiveUsageMetrics

SloUsageMetric[]

取得或設定 Service Tier Advisor 的 serviceLevelObjectiveUsageMetrics。

properties.usageBasedRecommendationServiceLevelObjective

string

取得或設定 Service Tier Advisor 的 usageBasedRecommendationServiceLevelObjective。

properties.usageBasedRecommendationServiceLevelObjectiveId

string (uuid)

取得或設定 Service Tier Advisor 的 usageBasedRecommendationServiceLevelObjectiveId。

type

string

資源類型。

SloUsageMetric

取得或設定 Service Tier Advisor 的 serviceLevelObjectiveUsageMetrics。

名稱 類型 Description
inRangeTimeRatio

number (double)

取得或設定 SLO 使用計量的 inRangeTimeRatio。

serviceLevelObjective

ServiceObjectiveName

SLO 使用計量的 serviceLevelObjective。

serviceLevelObjectiveId

string (uuid)

SLO 使用計量的 serviceLevelObjectiveId。

TransparentDataEncryption

此資料庫的透明數據加密資訊。

名稱 類型 Description
id

string

資源標識碼。

location

string

資源位置。

name

string

資源名稱。

properties.status

TransparentDataEncryptionStatus

資料庫透明數據加密的狀態。

type

string

資源類型。

TransparentDataEncryptionStatus

資料庫透明數據加密的狀態。

Description
Enabled
Disabled