Restoring an SSAS database
You will see how to restore an SSAS database in this recipe.
Getting ready
Locate your SSAS backup file, and replace the backup file parameter with the location of your file.
How to do it...
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Import the
SQLASCMDLETS
module as follows:#import SQLASCMDLETS module Import-Module SQLASCMDLETS -DisableNameChecking
Add the following script and run:
$instanceName = "KERRIGAN" $backupfile = "C:\Temp\AWDW.abf" Restore-ASDatabase -RestoreFile $backupfile -Server $instanceName -Name "SampleDW" -AllowOverwrite
How it works...
The Restore-ASDatabase cmdlet
allows
multidimensional or tabular SSAS databases to be restored when provided with a backup file:
$instanceName = "KERRIGAN" $backupfile = "C:\Temp\AWDW.abf" Restore-ASDatabase -RestoreFile $backupfile -Server $instanceName -Name "SampleDW" -AllowOverwrite
See also
The Backing up an SSAS database recipe
Learn more about the
Restore...