May 17, 2012 at 11:40 am
Is there a query that I can run against Anaylsis Services that will return the backup folder server property setting? I have an SSIS job I want to run on numerous SQL/AS servers that need to write and read a CSV file. Since this location differs on each server, I'd like to dynamically be able to set this connection string in the package.
May 18, 2012 at 1:00 am
Yes, there is. Here's the PowerShell and AMO (Analysis Management Objects) way.
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") | Out-Null;
[Microsoft.AnalysisServices.Server] $srv = New-Object Microsoft.AnalysisServices.Server;
[string]$ServerName = "Server\Instance";
$srv.Connect($ServerName);
$BackupDestination = $srv.ServerProperties.Item("BackupDir").Value;
$BackupDestination;
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy