Quantcast
Channel: Performance Analysis of Logs (PAL) Tool
Viewing all articles
Browse latest Browse all 913

Commented Unassigned: You cannot call a method on a null-valued expression [25978]

$
0
0
I keep getting this error message when trying to import SQL perfmon files.

An error occurred on...
If ($XmlCounterInstanceNode.NAME.ToLower() -eq $sCounterInstance.ToLower())
At C:\Program Files\PAL\PAL\PAL.ps1:1505 char:45 + If ($XmlCounterInstanceNode.NAME.ToLower ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You cannot call a method on a null-valued expression.

I created the perfmon template using the PAL tool and then captured the perfmon data into a BLG. I get this error when PAL is parsing the data.

Tried it on 2 different machines now and get the same error. Different BLG files.
Comments: ** Comment from web user: Dono **

I received the same error on a BLG file received from a customer server. The threshold file was for SQL Server 2012; there were no changes from the default.
The specific error is as follows:

Overall progress... Status: Creating a counter index, PAL 2.7.1 Progress: 41%... Creating a counter index,

An error occurred on...
If ($XmlCounterInstanceNode.NAME.ToLower() -eq $sCounterInstance.ToLower())
At C:\Program Files\PAL\PAL\PAL.ps1:1505 char:45 + If ($XmlCounterInstanceNode.NAME.ToLower ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You cannot call a method on a null-valued expression.

Reviewing the PAL.ps1 file, it appears that this IF statement sets $IsCounterInstanceFound to TRUE if the instance name matches; otherwise, it remains FALSE.
As a workaround, I tried both: 1) comment out the IF statement and leaving $IsCounterInstanceFound as FALSE, and 2) comment out the IF statement but ensure that $IsCounterInstanceFound is set to TRUE.
Option (1) resulted in further problems later on, but option (2) finished without any other errors.
Neither option is likely a good long-term option, but at least it allowed the analysis to continue to conclusion.


Viewing all articles
Browse latest Browse all 913

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>