Backup-ASDatabase

可讓資料庫管理員將 Analysis Service Database 備份至檔案。

語法

Backup-ASDatabase
      [-BackupFile] <String>
      [-Name] <String>
      [-AllowOverwrite]
      [-BackupRemotePartitions]
      [-ApplyCompression]
      [-FilePassword <SecureString>]
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-AllowOverwrite]
      [-BackupRemotePartitions]
      [-ApplyCompression]
      [-FilePassword <SecureString>]
      -Database <Database[]>
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

可讓資料庫管理員將 Analysis Service Database 備份至檔案。 如果只提及沒有位置的備份檔名,則會考慮安裝期間指定的預設備份位置。 資料庫管理員也可以透過管線傳遞多個資料庫,並執行備份作業。

Module requirements: version 21+ on PowerShell 5.1; version 21 (recent preview) or version 22+ on PowerShell 7.x.

範例

範例 1:依名稱備份資料庫

Backup-ASDatabase mydb.abf mydatabase

範例 2:使用壓縮備份資料庫

Backup-ASDatabase "D:\MyFolder\mydb.abf" mydatabase -AllowCompression

範例 3:使用壓縮和加密的備份資料庫

Backup-ASDatabase "D:\MyFolder\mydb.abf" mydatabase -AllowCompression -FilePassword:$pwd

參數

-AllowOverwrite

指出是否可以在備份期間覆寫目的地檔案。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ApplicationId

服務主體的應用程式識別碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ApplyCompression

指出備份檔是否會壓縮。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-BackupFile

備份檔路徑/名稱,其中會備份資料庫。 如果只提及沒有位置的備份檔名,則會考慮安裝期間指定的預設備份位置。 只有當資料庫以 Name 參數指定備份時,才會使用此參數,而不是使用 Database 參數傳入。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-BackupRemotePartitions

指出是否要備份遠程數據分割。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-CertificateThumbprint

服務主體的憑證指紋。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Credential

如果指定此參數,傳遞的使用者名稱和密碼將用來連線到指定的 Analysis Server 實例。 如果未指定任何認證,則會使用執行此工具之用戶的預設 Windows 帳戶。

類型:PSCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Database

要備份的資料庫或資料庫。 備份的檔名會與資料庫相同。

類型:Database[]
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-FilePassword

要與備份檔加密搭配使用的密碼

類型:SecureString
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

必須備份的 Analysis Services 資料庫名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ProgressAction

決定 PowerShell 如何回應腳本、Cmdlet 或提供者所產生的進度更新,例如 Write-Progress Cmdlet 所產生的進度列。 Write-Progress Cmdlet 會建立顯示命令狀態的進度列。

類型:ActionPreference
別名:proga
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Server

選擇性地指定要連接到的伺服器實例,如果目前不在 SQLAS 提供者目錄中。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ServicePrincipal

指定此連線使用服務主體。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-TenantId

服務主體的租用戶標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

Microsoft.AnalysisServices.Database[]

輸出

System.Object

備註

PowerBI Premium 產品目前不支援的所有 Analysis Services 實例支援。 未來將受到支援。