< Back
New-AzureRmSqlDatabaseExport
Post
NAME New-AzureRmSqlDatabaseExport
SYNOPSIS
Exports an Azure SQL Database as a .bacpac file to a storage account.
SYNTAX
New-AzureRmSqlDatabaseExport [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> -AdministratorLogin <String>
-AdministratorLoginPassword <SecureString> [-AuthenticationType {None | Sql | AdPassword}] [-DefaultProfile <IAzureContextContainer>] -StorageKey
<String> -StorageKeyType {StorageAccessKey | SharedAccessKey} -StorageUri <Uri> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmSqlDatabaseExport cmdlet exports an Azure SQL Database as a .bacpac file to a storage account. The get export database status
request may be sent to retrieve status information for this request.
This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
PARAMETERS
-AdministratorLogin <String>
Specifies the name of the SQL administrator.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AdministratorLoginPassword <SecureString>
Specifies the password of the SQL administrator.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AuthenticationType <AuthenticationType>
Specifies the type of authentication used to access the server. The default value is SQL if no authentication type is set.
The acceptable values for this parameter are:
- Sql. SQL authentication. Set the AdministratorLogin and AdministratorLoginPassword to the SQL administrator username and password. -
ADPassword. Azure Active Directory authentication. Set AdministratorLogin and AdministratorLoginPassword to the Azure AD administrator
username and password.
This parameter is only available on SQL Database V12 servers.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DatabaseName <String>
Specifies the name of the SQL Database.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group for the SQL Database server.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the SQL Database server.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StorageKey <String>
Specifies the access key for the storage account.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StorageKeyType <StorageKeyType>
Specifies the type of access key for the storage account.
The acceptable values for this parameter are:
- StorageAccessKey. This value uses a storage account key. - SharedAccessKey. This value uses a Shared Access Signature (SAS) key.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StorageUri <Uri>
Specifies the blob link, as a URL, to the .bacpac file.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.Database.Model.AzureSqlDatabaseImportExportBaseModel
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, sql, database, mssql
Example 1: Create an export request for a database
PS C:\\>New-AzureRmSqlDatabaseExport -ResourceGroupName "RG01" -ServerName "Server01" -DatabaseName "Database01" -StorageKeyType "StorageAccessKey"
-StorageKey "StorageKey01" -StorageUri "http://account01.blob.core.contoso.net/ ... e01.bacpac" -AdministratorLogin "User"
-AdministratorLoginPassword "secure password"
ResourceGroupName : RG01
ServerName : Server01
DatabaseName : Database01
StorageKeyType : StorageAccessKey
StorageKey :
StorageUri : http://account01.blob.core.contoso.net/ ... e01.bacpac
AdministratorLogin : User
AdministratorLoginPassword :
AuthenticationType : None
OperationStatusLink : https://management.azure.com/subscripti ... oviders/Mi
crosoft.Sql/servers/server01/databases/database01/importExportOperationResults/00000000-00
0-0000-0000-000000000000?api-version=2014-04-01
Status : InProgress
ErrorMessage :
This command creates an export request for the specified database.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... baseexport
Get-AzureRmSqlDatabaseImportExportStatus
New-AzureRmSqlDatabaseImport
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/
SYNOPSIS
Exports an Azure SQL Database as a .bacpac file to a storage account.
SYNTAX
New-AzureRmSqlDatabaseExport [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> -AdministratorLogin <String>
-AdministratorLoginPassword <SecureString> [-AuthenticationType {None | Sql | AdPassword}] [-DefaultProfile <IAzureContextContainer>] -StorageKey
<String> -StorageKeyType {StorageAccessKey | SharedAccessKey} -StorageUri <Uri> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmSqlDatabaseExport cmdlet exports an Azure SQL Database as a .bacpac file to a storage account. The get export database status
request may be sent to retrieve status information for this request.
This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
PARAMETERS
-AdministratorLogin <String>
Specifies the name of the SQL administrator.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AdministratorLoginPassword <SecureString>
Specifies the password of the SQL administrator.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AuthenticationType <AuthenticationType>
Specifies the type of authentication used to access the server. The default value is SQL if no authentication type is set.
The acceptable values for this parameter are:
- Sql. SQL authentication. Set the AdministratorLogin and AdministratorLoginPassword to the SQL administrator username and password. -
ADPassword. Azure Active Directory authentication. Set AdministratorLogin and AdministratorLoginPassword to the Azure AD administrator
username and password.
This parameter is only available on SQL Database V12 servers.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DatabaseName <String>
Specifies the name of the SQL Database.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group for the SQL Database server.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the SQL Database server.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StorageKey <String>
Specifies the access key for the storage account.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StorageKeyType <StorageKeyType>
Specifies the type of access key for the storage account.
The acceptable values for this parameter are:
- StorageAccessKey. This value uses a storage account key. - SharedAccessKey. This value uses a Shared Access Signature (SAS) key.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StorageUri <Uri>
Specifies the blob link, as a URL, to the .bacpac file.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.Database.Model.AzureSqlDatabaseImportExportBaseModel
NOTES
* Keywords: azure, azurerm, arm, resource, management, manager, sql, database, mssql
Example 1: Create an export request for a database
PS C:\\>New-AzureRmSqlDatabaseExport -ResourceGroupName "RG01" -ServerName "Server01" -DatabaseName "Database01" -StorageKeyType "StorageAccessKey"
-StorageKey "StorageKey01" -StorageUri "http://account01.blob.core.contoso.net/ ... e01.bacpac" -AdministratorLogin "User"
-AdministratorLoginPassword "secure password"
ResourceGroupName : RG01
ServerName : Server01
DatabaseName : Database01
StorageKeyType : StorageAccessKey
StorageKey :
StorageUri : http://account01.blob.core.contoso.net/ ... e01.bacpac
AdministratorLogin : User
AdministratorLoginPassword :
AuthenticationType : None
OperationStatusLink : https://management.azure.com/subscripti ... oviders/Mi
crosoft.Sql/servers/server01/databases/database01/importExportOperationResults/00000000-00
0-0000-0000-000000000000?api-version=2014-04-01
Status : InProgress
ErrorMessage :
This command creates an export request for the specified database.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... baseexport
Get-AzureRmSqlDatabaseImportExportStatus
New-AzureRmSqlDatabaseImport
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/