THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Davide Mauri

A place for my thoughts and experiences the Microsoft Data Platform

SSAS Backup and other useful PowerShell scripts

Today I was looking for a Powershell script to automatize the backup of Analysis Services database also capable to manage retention.

In such search I stubled upon the SSASBackp PowerShell script created by Idera which is also released for free.

There’s other script beside that in their PowerShell Free Scripts page

http://www.idera.com/Products/Free-Tools/PowerShell-scripts/

Though many of them probably needs some customization to satisfy your own specific needs, they can be a very useful as starting point to build your own (SSAS Backup is one exception since it is full featured and immediately usable without any changes).

Published Friday, July 30, 2010 7:34 PM by Davide Mauri

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Linchi Shea said:

'automatize' -- I like that word!

August 2, 2010 10:37 AM
 

Davide Mauri said:

:) Whops I should have used "automate" but I created an hybrid Italian/English word :)

August 2, 2010 10:50 AM
 

Linchi Shea said:

Actually, automatize is a real word and has a nice ring to it.

August 2, 2010 12:12 PM
 

Patton said:

I was able to download the link you posted here. That's very helpful.First of all I am very new to Powershell. I am taking the SSAS-Backup script from Idera using Powershell. Their script is great and work very good without modification. It works both for running through command prompt window or running through powershell window directly. However, I am stuck where I was trying to set this into the sql server agent job to schedule it. It throw this kind of error.

Executed as user: ONEABBOTT\svc-mssqlprod. The job script encountered the following errors. These errors did not stop the script:  A job step received an error at line 35 in a PowerShell script. The corresponding line is '    Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it.  '  A job step received an error at line 35 in a PowerShell script. The corresponding line is '    Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it.  '  A job step received an error at line 35 in a PowerShell script. The corresponding line is '    Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it.  '  A job step received an error at line 35 in a PowerShell script. The corresponding line is '    Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it.  '.

It's actually didn't get to backup if using the sql server agent job and choose powershell. I am not sure why with the same thing run successful through powershell without sql agent. Any thought?

March 29, 2011 2:30 PM
 

Davide Mauri said:

Hi Patton: I'm sorry I cannot help this time. I schedule Powershell jobs that doesn't need the SQL commandlets directly using the Windows Scheduler and not the SQL Server Agent....

March 31, 2011 11:44 AM

Leave a Comment

(required) 
(required) 
Submit

About Davide Mauri

Director of Software Development & Cloud Infrastructure @ Sensoria, an innovative smart garments and wearable company. After more than 15 year playing with the Microsoft Data Platform, with a specific focus on High Performance databases, Business Intelligence, Data Science and Data Architectures, he's now applying all his skills to IoT, defining architectures to crunch numbers, create nice user experiences and provide meaningful insights, all leveraging Microsoft Azure cloud. MVP on Data Platform since 2006 he has a very strong background development and love both the ER model and OO principles. He is also a fan of Agile Methodology and Automation, which he tries to apply everywhere he can, to make sure that "people think, machines do".

This Blog

Syndication

Privacy Statement