Database Extensions - Create Or Update
Perform a database extension operation, like database import, database export, or polybase import
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database. |
extension
|
path | True |
string |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.operationMode | True |
Operation mode of the operation: Import, Export, or PolybaseImport. |
|
properties.storageKey | True |
string |
Storage key for the storage account. |
properties.storageKeyType | True |
Storage key type: StorageAccessKey or SharedAccessKey. |
|
properties.storageUri | True |
string |
Storage Uri for the storage account. |
properties.administratorLogin |
string |
Administrator login name. |
|
properties.administratorLoginPassword |
string |
Administrator login password. |
|
properties.authenticationType |
string |
Authentication type: SQL authentication or AD password. |
|
properties.databaseEdition |
string |
Database edition for the newly created database in the case of an import operation. |
|
properties.maxSizeBytes |
string |
Database max size in bytes for the newly created database in the case of an import operation. |
|
properties.networkIsolation |
Optional resource information to enable network isolation for request. |
||
properties.serviceObjectiveName |
string |
Database service level objective for the newly created database in the case of an import operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully completed import/export operation. |
|
202 Accepted |
Import/Export operation is in progress. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Create or Update database extensions. |
Export database using database extension. |
Import database using database extension. |
Create or Update database extensions.
Sample request
PUT https://management.azure.com/subscriptions/a1c0814d-3c18-4e1e-a247-c128c12b1677/resourceGroups/rg_20cbe0f0-c2d9-4522-9177-5469aad53029/providers/Microsoft.Sql/servers/srv_1ffd1cf8-9951-47fb-807d-a9c384763849/databases/878e303f-1ea0-4f17-aa3d-a22ac5e9da08/extensions/polybaseimport?api-version=2021-11-01
{
"properties": {
"operationMode": "PolybaseImport",
"storageKeyType": "StorageAccessKey",
"storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml"
}
}
Sample response
{
"properties": {
"requestId": "10000000-0000-0000-0000-000000000002",
"requestType": "PolybaseImport",
"lastModifiedTime": "lastModifiedTime",
"serverName": "srv_1ffd1cf8-9951-47fb-807d-a9c384763849",
"databaseName": "878e303f-1ea0-4f17-aa3d-a22ac5e9da08",
"status": "succeeded"
},
"id": "10000000-0000-0000-0000-000000000002",
"name": "10000000-0000-0000-0000-000000000002",
"type": "Microsoft.Sql/servers/databases/extensions"
}
Export database using database extension.
Sample request
PUT https://management.azure.com/subscriptions/0ca8cd24-0b47-4ad5-bc7e-d70e35c44adf/resourceGroups/rg_d1ef9eae-044d-4710-ba59-b82e84ad3157/providers/Microsoft.Sql/servers/srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c/databases/db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68/extensions/Export?api-version=2021-11-01
{
"properties": {
"operationMode": "Export",
"storageKeyType": "StorageAccessKey",
"storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml",
"administratorLogin": "login",
"administratorLoginPassword": "password",
"authenticationType": "Sql"
}
}
Sample response
{
"properties": {
"requestId": "10000000-0000-0000-0000-000000000002",
"requestType": "Export",
"lastModifiedTime": "lastModifiedTime",
"serverName": "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c",
"databaseName": "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68",
"status": "Completed",
"queuedTime": "09/10/2021 18:35:10",
"blobUri": "https://teststorage.blob.core.windows.net/testcontainer/samplebacpac.bacpac",
"privateEndpointConnections": []
},
"id": "10000000-0000-0000-0000-000000000002",
"name": "10000000-0000-0000-0000-000000000002",
"type": "Microsoft.Sql/servers/databases/extensions"
}
Import database using database extension.
Sample request
PUT https://management.azure.com/subscriptions/17ca4d13-bf7d-4c33-a60e-b87a2820a325/resourceGroups/rg_062866bf-c4f4-41f9-abf0-b59132ca7924/providers/Microsoft.Sql/servers/srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82/databases/db_2a47e946-e414-4c00-94ac-ed886bb78302/extensions/Import?api-version=2021-11-01
{
"properties": {
"operationMode": "Import",
"storageKeyType": "StorageAccessKey",
"storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml",
"administratorLogin": "login",
"administratorLoginPassword": "password",
"authenticationType": "Sql"
}
}
Sample response
{
"properties": {
"requestId": "10000000-0000-0000-0000-000000000002",
"requestType": "Import",
"lastModifiedTime": "lastModifiedTime",
"serverName": "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82",
"databaseName": "db_2a47e946-e414-4c00-94ac-ed886bb78302",
"status": "Completed",
"queuedTime": "09/10/2021 18:35:10",
"blobUri": "https://teststorage.blob.core.windows.net/testcontainer/samplebacpac.bacpac",
"privateEndpointConnections": []
},
"id": "10000000-0000-0000-0000-000000000002",
"name": "10000000-0000-0000-0000-000000000002",
"type": "Microsoft.Sql/servers/databases/extensions"
}
Definitions
Name | Description |
---|---|
Database |
An Import, Export, or PolybaseImport resource. |
Import |
An Extension operation result resource. |
Network |
Contains the ARM resources for which to create private endpoint connection. |
Operation |
Operation mode of the operation: Import, Export, or PolybaseImport. |
Private |
Contains the private endpoint connection requests status. |
Storage |
Storage key type: StorageAccessKey or SharedAccessKey. |
DatabaseExtensions
An Import, Export, or PolybaseImport resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.administratorLogin |
string |
Administrator login name. |
properties.administratorLoginPassword |
string |
Administrator login password. |
properties.authenticationType |
string |
Authentication type: SQL authentication or AD password. |
properties.databaseEdition |
string |
Database edition for the newly created database in the case of an import operation. |
properties.maxSizeBytes |
string |
Database max size in bytes for the newly created database in the case of an import operation. |
properties.networkIsolation |
Optional resource information to enable network isolation for request. |
|
properties.operationMode |
Operation mode of the operation: Import, Export, or PolybaseImport. |
|
properties.serviceObjectiveName |
string |
Database service level objective for the newly created database in the case of an import operation. |
properties.storageKey |
string |
Storage key for the storage account. |
properties.storageKeyType |
Storage key type: StorageAccessKey or SharedAccessKey. |
|
properties.storageUri |
string |
Storage Uri for the storage account. |
type |
string |
Resource type. |
ImportExportExtensionsOperationResult
An Extension operation result resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.blobUri |
string |
Blob URI. |
properties.databaseName |
string |
Database name. |
properties.errorMessage |
string |
Error message. |
properties.lastModifiedTime |
string |
Last modified time. |
properties.privateEndpointConnections |
Gets the status of private endpoints associated with this request. |
|
properties.queuedTime |
string |
Queued time. |
properties.requestId |
string |
Request Id. |
properties.requestType |
string |
Request type. |
properties.serverName |
string |
Server name. |
properties.status |
string |
Operation status. |
type |
string |
Resource type. |
NetworkIsolationSettings
Contains the ARM resources for which to create private endpoint connection.
Name | Type | Description |
---|---|---|
sqlServerResourceId |
string |
The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation. |
storageAccountResourceId |
string |
The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter. |
OperationMode
Operation mode of the operation: Import, Export, or PolybaseImport.
Name | Type | Description |
---|---|---|
Export |
string |
|
Import |
string |
|
PolybaseImport |
string |
PrivateEndpointConnectionRequestStatus
Contains the private endpoint connection requests status.
Name | Type | Description |
---|---|---|
privateEndpointConnectionName |
string |
The connection name for the private endpoint. |
privateLinkServiceId |
string |
Resource id for which the private endpoint is created. |
status |
string |
Status of this private endpoint connection. |
StorageKeyType
Storage key type: StorageAccessKey or SharedAccessKey.
Name | Type | Description |
---|---|---|
SharedAccessKey |
string |
|
StorageAccessKey |
string |