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 |