Backing up an SSAS database
In this recipe, we will create an SSAS database backup.
Getting ready
Choose an SSAS database you want to back up, and replace the –Name
parameter in the recipe. Ensure that you are running PowerShell with administrator privileges to the SSAS instance.
How to do it...
These are the steps required to create an SSAS database backup:
- Open PowerShell ISE as an administrator.
- Import the
SQLASCmdlets
module as follows:#import SQLASCmdlets module Import-Module SQLASCmdlets -DisableNameChecking
- Add the following script and run it:
$instanceName = "localhost" $backupfile = "C:\Temp\AWDW.abf" Backup-ASDatabase -BackupFile $backupfile -Name "AWDW" -Server $instanceName -AllowOverwrite -ApplyCompression
How it works...
The Backup-ASDatabase
cmdlet allows multidimensional or tabular SSAS databases to be backed up to a file. In this recipe, we chose to do a compressed backup for the AWDW
SSAS database to an Analysis Services Backup file (.abf
):
...