Databases - Import

Bir bacpac'i yeni bir veritabanına aktarır.

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

URI Parametreleri

Name İçinde Gerekli Tür Description
resourceGroupName
path True

string

Kaynağı içeren kaynak grubunun adı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.

serverName
path True

string

Sunucunun adı.

subscriptionId
path True

string

Azure aboneliğini tanımlayan abonelik kimliği.

api-version
query True

string

İstek için kullanılacak API sürümü.

İstek Gövdesi

Name Tür Description
parameters

ImportRequest

Bir Bacpac'i veritabanına aktarmak için gerekli parametreler.

Yanıtlar

Name Tür Description
200 OK

ImportExportResponse

Tamam

202 Accepted

Kabul edildi

Örnekler

Import bacpac into new database Max with SAS key
Import bacpac into new database Max with storage key
Import bacpac into new database Min with SAS key
Import bacpac into new database Min with storage key

Import bacpac into new database Max with SAS key

Örnek isteği

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

{
  "databaseName": "TestDbImport",
  "edition": "Basic",
  "serviceObjectiveName": "Basic",
  "maxSizeBytes": "2147483648",
  "storageKeyType": "SharedAccessKey",
  "storageKey": "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=sdfsdfklsdjflSLIFJLSIEJFLKSDJFDd/%2wdfskdjf3%3D&sv=2015-07-08",
  "storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
  "administratorLogin": "dummyLogin",
  "administratorLoginPassword": "<administratorLoginPassword>",
  "authenticationType": "SQL"
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/importExportOperationResult/f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "name": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "type": "Microsoft.Sql/servers/importExportOperationResults",
  "properties": {
    "requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
    "requestType": "Import",
    "queuedTime": "3/1/2017 12:14:25 AM",
    "lastModifiedTime": "3/1/2017 12:16:33 AM",
    "blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
    "serverName": "test",
    "databaseName": "testdb",
    "status": "Completed",
    "errorMessage": null
  }
}

Import bacpac into new database Max with storage key

Örnek isteği

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

{
  "databaseName": "TestDbImport",
  "edition": "Basic",
  "serviceObjectiveName": "Basic",
  "maxSizeBytes": "2147483648",
  "storageKeyType": "StorageAccessKey",
  "storageKey": "sdlfkjdsf+sdlfkjsdlkfsjdfLDKFJSDLKFDFKLjsdfksjdflsdkfD2342309432849328479324/3RSD==",
  "storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
  "administratorLogin": "dummyLogin",
  "administratorLoginPassword": "<administratorLoginPassword>",
  "authenticationType": "SQL"
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/importExportOperationResult/f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "name": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "type": "Microsoft.Sql/servers/importExportOperationResults",
  "properties": {
    "requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
    "requestType": "Import",
    "queuedTime": "3/1/2017 12:14:25 AM",
    "lastModifiedTime": "3/1/2017 12:16:33 AM",
    "blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
    "serverName": "test",
    "databaseName": "testdb",
    "status": "Completed",
    "errorMessage": null
  }
}

Import bacpac into new database Min with SAS key

Örnek isteği

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

{
  "databaseName": "TestDbImport",
  "edition": "Basic",
  "serviceObjectiveName": "Basic",
  "maxSizeBytes": "2147483648",
  "storageKeyType": "SharedAccessKey",
  "storageKey": "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=sdfsdfklsdjflSLIFJLSIEJFLKSDJFDd/%2wdfskdjf3%3D&sv=2015-07-08",
  "storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
  "administratorLogin": "dummyLogin",
  "administratorLoginPassword": "<administratorLoginPassword>"
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/importExportOperationResult/f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "name": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "type": "Microsoft.Sql/servers/importExportOperationResults",
  "properties": {
    "requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
    "requestType": "Import",
    "queuedTime": "3/1/2017 12:14:25 AM",
    "lastModifiedTime": "3/1/2017 12:16:33 AM",
    "blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
    "serverName": "test",
    "databaseName": "testdb",
    "status": "Completed",
    "errorMessage": null
  }
}

Import bacpac into new database Min with storage key

Örnek isteği

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

{
  "databaseName": "TestDbImport",
  "edition": "Basic",
  "serviceObjectiveName": "Basic",
  "maxSizeBytes": "2147483648",
  "storageKeyType": "StorageAccessKey",
  "storageKey": "sdlfkjdsf+sdlfkjsdlkfsjdfLDKFJSDLKFDFKLjsdfksjdflsdkfD2342309432849328479324/3RSD==",
  "storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
  "administratorLogin": "dummyLogin",
  "administratorLoginPassword": "<administratorLoginPassword>"
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/importExportOperationResult/f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "name": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
  "type": "Microsoft.Sql/servers/importExportOperationResults",
  "properties": {
    "requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
    "requestType": "Import",
    "queuedTime": "3/1/2017 12:14:25 AM",
    "lastModifiedTime": "3/1/2017 12:16:33 AM",
    "blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
    "serverName": "test",
    "databaseName": "testdb",
    "status": "Completed",
    "errorMessage": null
  }
}

Tanımlar

Name Description
AuthenticationType

Kimlik doğrulama türü.

DatabaseEdition

Oluşturulan veritabanının sürümü.

SKU'ların listesi bölgeye ve destek teklifine göre farklılık gösterebilir. Azure bölgesindeki aboneliğiniz için kullanılabilen SKU'ları (SKU adı, katman/sürüm, aile ve kapasite dahil) belirlemek için Capabilities_ListByLocation REST API'sini veya aşağıdaki komutlardan birini kullanın:

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

Alma/Dışarı Aktarma işlemi için yanıt.

ImportRequest

Bir Bacpac'i veritabanına aktarmak için gerekli parametreler.

ServiceObjectiveName

Veritabanına atanacak hizmet hedefinin adı.

StorageKeyType

Kullanılacak depolama anahtarının türü.

AuthenticationType

Kimlik doğrulama türü.

Değer Description
SQL
ADPassword

DatabaseEdition

Oluşturulan veritabanının sürümü.

SKU'ların listesi bölgeye ve destek teklifine göre farklılık gösterebilir. Azure bölgesindeki aboneliğiniz için kullanılabilen SKU'ları (SKU adı, katman/sürüm, aile ve kapasite dahil) belirlemek için Capabilities_ListByLocation REST API'sini veya aşağıdaki komutlardan birini kullanın:

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

ImportExportResponse

Alma/Dışarı Aktarma işlemi için yanıt.

Name Tür Description
id

string

Kaynak Kimliği.

name

string

Kaynak adı.

properties.blobUri

string

Blob uri'sini.

properties.databaseName

string

Veritabanının adı.

properties.errorMessage

string

Sunucudan döndürülen hata iletisi.

properties.lastModifiedTime

string

İşlem durumu son değiştirme zamanı.

properties.queuedTime

string

İşlem sıraya alındı süresi.

properties.requestId

string (uuid)

İşlemin istek türü.

properties.requestType

string

İşlemin istek türü.

properties.serverName

string

Sunucunun adı.

properties.status

string

Sunucudan döndürülen durum iletisi.

type

string

Kaynak türü.

ImportRequest

Bir Bacpac'i veritabanına aktarmak için gerekli parametreler.

Name Tür Default value Description
administratorLogin

string

SQL yöneticisinin adı.

administratorLoginPassword

string

SQL yöneticisinin parolası.

authenticationType

AuthenticationType

SQL

Kimlik doğrulama türü.

databaseName

string

İçeri aktaracak veritabanının adı.

edition

DatabaseEdition

Oluşturulan veritabanının sürümü.

SKU'ların listesi bölgeye ve destek teklifine göre farklılık gösterebilir. Azure bölgesindeki aboneliğiniz için kullanılabilen SKU'ları (SKU adı, katman/sürüm, aile ve kapasite dahil) belirlemek için Capabilities_ListByLocation REST API'sini veya aşağıdaki komutlardan birini kullanın:

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

string

Yeni içeri aktarılan veritabanı için en büyük boyut.

serviceObjectiveName

ServiceObjectiveName

Veritabanına atanacak hizmet hedefinin adı.

storageKey

string

Kullanılacak depolama anahtarı. Depolama anahtarı türü SharedAccessKey ise, önce "?." olmalıdır

storageKeyType

StorageKeyType

Kullanılacak depolama anahtarının türü.

storageUri

string

Kullanılacak depolama uri'si.

ServiceObjectiveName

Veritabanına atanacak hizmet hedefinin adı.

Değer 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

StorageKeyType

Kullanılacak depolama anahtarının türü.

Değer Description
StorageAccessKey
SharedAccessKey