How to Backup MS Analysis Server databases

I have inherited a SQL Server 2012 environment that also contains a Microsoft Analytics Server.

 I've gotten backups setup using maintenance plans for the "regular" SQL Server 2012 environment.

But now I need to get backups scheduled for the Analytics databases.

I'm a newcomer to SQL Server and still learning the ropes so I'm not aware of how to get the Analytics backups set up.

I'd like to have a maintenance plan for this if it is possible so that I can ensure it happens in the same time frame as the other backups.

TIA!
data_bitsdbaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Matt BowlerDB team leadCommented:
Assuming you mean Analysis Services - you could look at:

http://mattsql.wordpress.com/2012/07/19/backups-in-sql-server-analysis-services/
0
Daniel_PLDB Expert/ArchitectCommented:
Hi,
Please find following Powershell script which will backup all SSAS databases on a host
You can customize it to use different remote server, however it is a good starting point :)
(ps. please customize $path = "J:\DBBackup\" to your path)
try
	{
		[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") | Out-Null;
	}
catch
	{
		Write-Host "!!! ERROR in Analysis Services backup script:"
		Write-Host $_.Exception.Message -BACK YELLOW -FORE RED
		Write-Host '`nCause:`nCould not load Microsoft.AnalysisServices dll library'
		EXIT 5012
	}
$path = "J:\DBBackup\"
if (!(Test-Path $path))
	{
		Write-Host "!!! ERROR in Analysis Services backup script:"  -BACK YELLOW -FORE RED
		Write-Host "`tBackup file path: $path `tis not found!"  -BACK YELLOW -FORE RED
		EXIT 5013
	}

$namespacesa=@();
		$namespaces=gwmi -namespace "root\Microsoft\SqlServer" -class "__Namespace" | Select Name;
		$namespacesa+=($namespaces | ?{$_.Name -match "ComputerManagement*"} | ForEach-Object  { $_.Name } );
		for ($i=0;$i -le $namespaces.Count-1;$i++)
			{
				if ($i -eq 0)
					{
						$nsver=$namespacesa[$i];
					}
					
				if ($i -gt 0)
					{
						if ($namespacesa[$i] -gt $namespacesa[$i-1])
							{
								$nsver=$namespacesa[$i];
							}
					}
			};
$ASobj=gwmi sqlservice -Namespace "root\Microsoft\SqlServer\$nsver" | where {$_.SQLServiceType -eq 5}
$ASsvc=$ASobj.ServiceName
if ($ASsvc -match 'MSSQLServer')
	{
		$ASname=$ASobj.HostName;		
	}
else
	{
		$ASname=$ASobj.HostName+"`\"+$ASsvc.Split('$')[1];
	}
$serverAS = New-Object Microsoft.AnalysisServices.Server

Try
	{
		$serverAS.Connect($ASname);
	}
catch
	{
		Write-Host "!!! ERROR in Analysis Services backup script:"
		Write-Host $_.Exception.Message -BACK YELLOW -FORE RED
		Write-Host "`nCause:`nCould not connect to AS: $ASname"
		EXIT 5014
	}

foreach ($db in $serverAS.databases)
	{
		$datestr=get-date -Format "yyyymmddhhmm"
		$file=$path+$db.name+"_"+$datestr+".abf"
		Try
			{
				Write-Host "Backing up $($db.name) ..."
				$db.Backup($file);
				#$db.Name
			}
		catch
			{
				Write-Host "!!! ERROR in Analysis Services backup script:"
				Write-Host $_.Exception.Message -BACK YELLOW -FORE RED
				Write-Host "`nCause:`nCould not backup AS database: $($db.Name)"
				EXIT 5015
			}
				Write-Host "Done!`n"
	}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
data_bitsdbaAuthor Commented:
Thanks for info. Yes, I did mean Analysis Services. That shows my newbie-ness to Microsoft technology.

Thanks again!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.