Highlighted
otmanix
2 Iron

How to backup Microsoft SQL Server 2012 Analysis service

example:

There's a data warehouse with a multidimensional database BI within Microsoft SQL Server Analysis service which has to be backed up.

Afaik there's no integration in NMSQL/NMM to do that. But you can backup up to a file with onboard tools and use a filesystem Backup with Networker client oder NMM in order to backup that file. You can use savepnpc.exe or nsrsnap_vss_savepnpc.exe and use a pre-script to create a Analysis service database backup just before running a filesystem backup. Here's how to do it using Microsoft Powershell (tested with MS SQL Server 2012).

preparation

open powershell as admin and run

Set-ExecutionPolicy unrestricted

Type y and hit enter to allow importing Powershell modules

backup

C:\Program Files\Legato\nsr\res\FILESYSTEM-GROUP.res

type: nsrsnapvsssavepnpc;

precmd: "c:\\batch\\backup_olap.cmd";

pstcmd: "echo bye";

timeout: "12:00:00";

abort precmd with group: No;

C:\batch\backup_olap.cmd

e:

del E:\DATAWAREHOUSE\OLAP\Backup\BI_psbackup.abf

powershell.exe c:\batch\backup_olap.ps1

C:\batch\backup_olap.ps1

# M$ SQL powershell

# import modules for sql

Import-Module SQLPS –DisableNameChecking

Import-module SQLASCmdlets

# backup analysis db

Backup-ASDatabase -BackupFile E:\DATAWAREHOUSE\OLAP\Backup\BI_psbackup.abf -Name BI -ApplyCompression

exit

restore

open powershell and run

Restore-ASDatabase -Name BI -RestoreFile E:\DATAWAREHOUSE\OLAP\Backup\BI_psbackup.abf

misc

You can find further infos here.

Kind regards, Otmanix

0 Kudos