1

Closed

WindowsCounter2012 Error while retreiving PAL report for SQL Server Counters

description

Hi,
I am receiving this WindowsCounter2012 Error show below whenever i am trying to generate a report through PAL V2.2.1 to get the analysis of the SQL Server Counters i got the log file for,
This is what the Queue script looks like before it is executed,
 
Powershell ".\PAL.ps1"
-Log ''
-ThresholdFile 'C:\Program Files\PAL\PAL\SQLServer.xml'
-Interval 'AUTO'
-IsOutputHtml $True
-HtmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm'
-IsOutputXml $False
-XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml'
-AllCounterStats $False
-NumberOfProcessors '24'
-ThreeGBSwitch $False
-SixtyFourBit $True
-TotalMemory '144'
-RAID5Drives 'NULL'
-RAID1Drives 'NULL'
 
 
Error:
'WindowsCounters2012' is not recognized as an internal or external command,
operable program or batch file.
 
Can someone please let me know what am i missing, i use to generate reports earlier with PAL v 1.3.6.2 but since i upgraded it, i am receiving this error,
 
Thanks
FK
Closed May 30, 2012 at 6:04 AM by ClintH
The user removed the ambersand from the file path.

comments

ClintH wrote Apr 17, 2012 at 11:54 PM

The Log parameter cannot be empty. It looks like you didn't select a counter log for analysis on the first part of the PAL Wizard. With that said, it should have came back with a better error than that. I'll look into it. Thanks for posting this.

ClintH wrote Apr 18, 2012 at 12:00 AM

In my latest private build (v2.3), it comes back with a propert error about missing the Log parameter.
I searched the PAL.ps1 code and the SQLServer.xml file, but I find no hits for 'WindowsCounters2012', so I have no idea why it is throwing an error for that. Did you get that SQLServer.xml file from some other place other than this web site?

farooqkhan wrote Apr 18, 2012 at 4:58 PM

I did selected the log file, it just for showing the other parameters i just took a sample,

Or for Clarification, this is what my Power Shell queue scripts looks like,


Powershell ".\PAL.ps1"
-Log 'D:\PerfmonLogs\SQL06_20120414-000003\SQL06_DB&WindowsCounters2012 14April 00 02 01 AM.blg'
-ThresholdFile 'C:\Program Files\PAL\PAL\SQLServer.xml'
-Interval 'AUTO'
-IsOutputHtml $True
-HtmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm'
-IsOutputXml $False
-XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml'
-AllCounterStats $False
-NumberOfProcessors '24'
-ThreeGBSwitch $False
-SixtyFourBit $True
-TotalMemory '144'
-RAID5Drives 'NULL'
-RAID1Drives 'NULL'

Thanks

farooqkhan wrote Apr 18, 2012 at 5:05 PM

I have installed the new software and had no modifications or update to the SQLServer.xml file, the log file is good, i tested it on a different machine where i had the old PALv1.3.6, so i guess there is something i am missing on this one.

farooqkhan wrote Apr 18, 2012 at 6:23 PM

Here is another example of the output,

C:\Program Files\PAL\PAL>C:

C:\Program Files\PAL\PAL>cd "C:\Program Files\PAL\PAL"

C:\Program Files\PAL\PAL>Powershell -NoProfile ".\PAL.ps1" -Log 'D:\PerfmonLogs\SQL06_20120414-000003\SQL06_DB&WindowsCounters2012 14April 00 02 01 AM.blg' -ThresholdFile 'C:\
Program Files\PAL\PAL\SQLServer.xml' -Interval 'AUTO' -IsOutputHtml $True -HtmlO
utputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm' -IsOutputXml $Fal
se -XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml' -AllCount
erStats $True -OutputDir 'C:\Users\fakhan\Desktop\PAL_Reports' -NumberOfProcessors
'4' -ThreeGBSwitch $False -SixtyFourBit $False -TotalMemory '4' -RAID5Drives 'N
ULL' -RAID1Drives 'NULL'
The string starting:
At line:1 char:16
  • .\PAL.ps1 -Log <<<< 'C:\PerfLogs\xxxxxx-SQL01_DB
    is missing the terminator: '.
    At line:1 char:44
  • .\PAL.ps1 -Log 'C:\PerfLogs\xxxxxx-SQL01_DB <<<<
    • CategoryInfo : ParserError: (C:\PerfLogs\xxxxxx-SQL01_DB:String
      ) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
'WindowsCounters2012' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\PAL\PAL>

ClintH wrote Apr 20, 2012 at 8:10 AM

Ah, I see the problem now. I am able to reproduce the error now. Thank you for providing more details. The ambersand (&) in the file name is a special character in PowerShell. I use literal quotes around the file path to the BLG, but Powershell still tries to parse the ambersand. The easiest thing to do is to rename the BLG file to another name without the ambersand. Is this something you can do? I'm not sure if I would be able to code around this condition or not.

farooqkhan wrote Apr 23, 2012 at 8:45 PM

Thanks Clint, The output is generated after the file name was re-named, removing the "&" sign from the filename.