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 on SQL Server, Business Intelligence and .NET

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

Davide Mauri - MCP, MCAD, MCDBA, MCT, MVP on SQL Server - has worked with SQL Server since version 6.5, and his interests cover the whole platform, from the Relational Engine to Analysis Services, from architecture definition to performance tuning. He also has a strong knowledge of XML, .NET and the Object Oriented Design principles, which allows him to have the correct vision and experience to handle development of complex business intelligence solutions. Having worked as a Microsoft Certified Teacher for many years, Davide is able to pass all his knowledge to his co-workers, allowing his team to deliver high-quality solutions. He currently works as a Mentor for SolidQ and can be found speaking in many Italian and internationals events.

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement