Start-AzureSqlDatabaseExport
启动从Azure SQL 数据库到 Blob 存储的导出操作。
注意
本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧式 Azure 资源。 创建新资源时,建议不要使用旧的 PowerShell 模块,因为计划将停用 ASM。 有关详细信息,请参阅 Azure Service Manager 停用。
Az PowerShell 模块是建议用于管理 PowerShell 的 Azure 资源管理器 (ARM) 资源的 PowerShell 模块。
语法
ByContainerObject
Start-AzureSqlDatabaseExport
-SqlConnectionContext <ISqlServerConnectionInformation>
-StorageContainer <AzureStorageContainer>
-DatabaseName <String>
-BlobName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ByContainerName
Start-AzureSqlDatabaseExport
-SqlConnectionContext <ISqlServerConnectionInformation>
-StorageContext <IStorageContext>
-StorageContainerName <String>
-DatabaseName <String>
-BlobName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
说明
Start-AzureSqlDatabaseExport cmdlet 启动从Azure SQL 数据库到 Blob 存储的导出操作。 该操作需要数据库服务器连接上下文。 使用 Get-AzureSqlDatabaseImportExportStatus cmdlet 获取导出操作的状态。
示例
示例 1:导出数据库
PS C:\>$Credential = Get-Credential
PS C:\> $SqlContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $Credential
PS C:\> $StorageContext = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageKey
PS C:\> $Container = Get-AzureStorageContainer -Name $ContainerName -Context $StorageContext
PS C:\> $exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlContext -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $BlobName
此示例从Azure SQL 数据库启动导出过程,该$DatabaseName变量中存储的名称到存储在$BlobName变量中的 Blob 存储。
参数
-BlobName
指定此 cmdlet 将数据库导出到的 Azure Blob 存储的名称。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DatabaseName
指定此 cmdlet 从中导出数据的数据库的名称。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Profile
指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。
参数属性
| 类型: | AzureSMProfile |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SqlConnectionContext
指定包含数据库的服务器的连接上下文。
参数属性
| 类型: | ISqlServerConnectionInformation |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-StorageContainer
指定包含此 cmdlet 将数据库导出到其中的 Blob 的存储容器。
参数属性
| 类型: | AzureStorageContainer |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByContainerObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-StorageContainerName
指定包含此 cmdlet 将数据库导出到其中的 Blob 的存储容器的名称。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByContainerName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-StorageContext
指定 Blob 存储容器的上下文。
参数属性
| 类型: | IStorageContext |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByContainerName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。