Sometime , Analysis services engine terminates unexpectedly with an internal error when unexpected exception occurred. In this case, you could find in the log directory various mini memory dump.
It is recommended to contact Microsoft Support to help on the analysis of the dump to identify the root cause of the problem
$serverName = "serverName"$instanceNameOLAP = 'mySSAS_InstanceName' # Get the internal OLAP instance Name $InternalInstanceName=(get-itemproperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\OLAP").$instanceNameOLAP
# Get the registry path where dumpDir is located $keyName="HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\"+$InternalInstanceName+"\CPE"
# Get the value of ErrorDumpDir key$serverLogFolder=$(Get-ItemProperty $keyName).ErrorDumpDir
# Lists the objects stored in this folder where the extension is .mdmp.$dump = dir $serverLogFolder | ?{$_.name -match “^*.mdmp$”}
foreach ($b in $dump | SELECT LastWriteTime,Name){ write-host 'Found memory dump inside '$serverLogFolder break;}
$dump | SELECT LastWriteTime,Name, Length
Script updated 9th April 2012.
Michel Degremont | Premier Field Engineer - SQL Server Core Engineer |
You could find below a sample a script powershell to see which property is no default value of Analysis Services:
$serverName = "serverName\SQL2008_InstanceName"
# Load the AMO assembly in Powershell [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
# Create a server object$serverAS = New-Object Microsoft.AnalysisServices.Server
# Connect to your Analysis Services server $serverAS.connect($serverName)
# Creation of my dataset to store my result$myDS = new-object System.Data.DataSet$myDS.Tables.Add("myDS")$myDS.Tables["myDS"].Columns.Add("name",[string])| out-null$myDS.Tables["myDS"].Columns.Add("value",[string])| out-null$myDS.Tables["myDS"].Columns.Add("defaultvalue",[string])| out-null
# Browsing all properties to see which one has been changed foreach($b in $serverAS.ServerProperties | SELECT name,value,defaultvalue ){ # Check if the current value is different from the default value if ($b.value -ne $b.defaultvalue) { # Add a new row to my Data Set $dr = $myDS.Tables["myDS"].NewRow() # Fill the cells $dr["name"] = $b.name; $dr["value"] = $b.value.ToString(); $dr["defaultvalue"] = $b.defaultvalue; $myDS.Tables["myDS"].Rows.Add($dr)
}
# Query the result$myDS.Tables["myDS"] | SELECT name,value,defaultvalue;
I will try to illustrate how to get various information about Analysis Services by using powershell.
You could find below the first script to make the first connection:
# Create a server object :$serverAS = New-Object Microsoft.AnalysisServices.Server
# Select the information$serverAS | SELECT Name,Edition,Version