Monday, August 12, 2013

SSAS - XMLA script to restore the Analysis database



This script provides an easier way of restoring the analysis DB and it is useful when replica or snapshot of analysis DB is required in automate fashion. Change the path of your backup (.adf) file and your SQL Server OLAP data folder in the script before execution.

<Restore xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <File>G:\MyAnalysisDBBackup.abf</File>
  <DatabaseName>MyAnalysisDBName</DatabaseName>
  <AllowOverwrite>TRUE</AllowOverwrite>
  <DbStorageLocation xmlns="http://schemas.microsoft.com/analysisservices/2008/engine/100/100">C:\Program Files\Microsoft SQL Server\MSAS11.SQL2012\OLAP\Data\</DbStorageLocation>
</Restore>
 
 
Following are the benefits of this script:
1. Easier way of restoring the analysis DB
2. Helpful in automating the restore process
3. Can be utilized for creating replica or snapshot of DB in an automated way.

No comments:

Post a Comment