Share via


PerfLib 2.0 counter removal failed with exit code 2. Command line: C:\WINDOWS\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\120\Shared\

Question

Thursday, December 19, 2019 7:46 AM

This has been frustrating me for weeks. I have had sql 2014 on my machine since I installed it over a year ago. Why does it now blow up on me. I cannot reinstall it. Every time the Dabase Engine Services and SQL Server Replication fails. Everything else installs.  How do I get this to work?   How can I show you the detail.txt file ? I don't think I can paste it into there. I tried already. Will it work?

TITLE: Microsoft SQL Server 2014 Setup

The following error has occurred:

PerfLib 2.0 counter removal failed with exit code 2. Command line: C:\WINDOWS\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\120\Shared\

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x590D6427%25400x24BDAA65%25401260%25401

BUTTONS:

OK

(01) 2019-12-18 23:28:34 Slp:     HResult : 0x84ec0001
(01) 2019-12-18 23:28:34 Slp:         FacilityCode : 1260 (4ec)
(01) 2019-12-18 23:28:34 Slp:         ErrorCode : 1 (0001)
(01) 2019-12-18 23:28:34 Slp:     Data:
(01) 2019-12-18 23:28:34 Slp:       Action = removal
(01) 2019-12-18 23:28:34 Slp:       ReturnCode = 2
(01) 2019-12-18 23:28:34 Slp:       ProcessName = C:\WINDOWS\system32\unlodctr.exe
(01) 2019-12-18 23:28:34 Slp:       ProcessArgs = /m:hkengperfctr.xml
(01) 2019-12-18 23:28:34 Slp:       WorkingDir = C:\Program Files\Microsoft SQL Server\120\Shared\
(01) 2019-12-18 23:28:34 Slp:       WatsonData = Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1
(01) 2019-12-18 23:28:34 Slp:       SQL.Setup.FailureCategory = ConfigurationFailure
(01) 2019-12-18 23:28:34 Slp:       WatsonConfigActionData = REPAIR@CONFIGNONRC@SQL_ENGINE_CORE_CNS
(01) 2019-12-18 23:28:34 Slp:       WatsonExceptionFeatureIdsActionData = System.String[]
(01) 2019-12-18 23:28:34 Slp:     Stack:
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.AddRemovePerfLib2Counters(Boolean register, Boolean shouldThrow)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.Repair(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
(01) 2019-12-18 23:28:34 Slp: Watson Bucket 2

All replies (3)

Thursday, December 19, 2019 5:02 PM

(01) 2019-12-18 23:28:34 Slp:    at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.AddRemovePerfLib2Counters(Boolean register, Boolean shouldThrow)
(01) 2019-12-18 23:28:34 Slp:    at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.Repair(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
(01) 2019-12-18 23:28:34 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
(01) 2019-12-18 23:28:34 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
(01) 2019-12-18 23:28:34 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2019-12-18 23:28:34 Slp: Inner exceptions are being indented
(01) 2019-12-18 23:28:34 Slp:
(01) 2019-12-18 23:28:34 Slp: Exception type: Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException
(01) 2019-12-18 23:28:34 Slp:     Message:
(01) 2019-12-18 23:28:34 Slp:         PerfLib 2.0 counter removal failed with exit code 2. Command line: C:\WINDOWS\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\120\Shared\
(01) 2019-12-18 23:28:34 Slp:     HResult : 0x84ec0001
(01) 2019-12-18 23:28:34 Slp:         FacilityCode : 1260 (4ec)
(01) 2019-12-18 23:28:34 Slp:         ErrorCode : 1 (0001)
(01) 2019-12-18 23:28:34 Slp:     Data:
(01) 2019-12-18 23:28:34 Slp:       Action = removal
(01) 2019-12-18 23:28:34 Slp:       ReturnCode = 2
(01) 2019-12-18 23:28:34 Slp:       ProcessName = C:\WINDOWS\system32\unlodctr.exe
(01) 2019-12-18 23:28:34 Slp:       ProcessArgs = /m:hkengperfctr.xml
(01) 2019-12-18 23:28:34 Slp:       WorkingDir = C:\Program Files\Microsoft SQL Server\120\Shared\
(01) 2019-12-18 23:28:34 Slp:       WatsonData = Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1
(01) 2019-12-18 23:28:34 Slp:       SQL.Setup.FailureCategory = ConfigurationFailure
(01) 2019-12-18 23:28:34 Slp:       WatsonConfigActionData = REPAIR@CONFIGNONRC@SQL_ENGINE_CORE_CNS
(01) 2019-12-18 23:28:34 Slp:       WatsonExceptionFeatureIdsActionData = System.String[]
(01) 2019-12-18 23:28:34 Slp:     Stack:
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.AddRemovePerfLib2Counters(Boolean register, Boolean shouldThrow)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.Repair(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
(01) 2019-12-18 23:28:34 Slp:         at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
(01) 2019-12-18 23:28:34 Slp: Watson Bucket 2
 Original Parameter Values

(01) 2019-12-18 23:28:34 Slp: Parameter 0 : SQL Server 2014@RTM@

(01) 2019-12-18 23:28:34 Slp: Parameter 1 : Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.AddRemovePerfLib2Counters

(01) 2019-12-18 23:28:34 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.XTP.HkPerfCtrConfigurationPrivate.AddRemovePerfLib2Counters

(01) 2019-12-18 23:28:34 Slp: Parameter 3 : Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1260@1

(01) 2019-12-18 23:28:34 Slp: Parameter 4 : Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1260@1

(01) 2019-12-18 23:28:34 Slp: Parameter 5 : HkPerfCountersConfigAction_repair_postmsi_Engine

(01) 2019-12-18 23:28:34 Slp: Parameter 6 : REPAIR@CONFIGNONRC@SQL_ENGINE_CORE_CNS

(01) 2019-12-18 23:28:34 Slp: Parameter 7 : Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1

(01) 2019-12-18 23:28:34 Slp: Parameter 8 : Microsoft.SqlServer.Configuration.XTP.LodCtrFailedException@1

(01) 2019-12-18 23:28:34 Slp:
 Final Parameter Values

(01) 2019-12-18 23:28:34 Slp: Parameter 0 : SQL Server 2014@RTM@

(01) 2019-12-18 23:28:34 Slp: Parameter 1 : 0x590D6427

(01) 2019-12-18 23:28:34 Slp: Parameter 2 : 0x590D6427

(01) 2019-12-18 23:28:34 Slp: Parameter 3 : 0x24BDAA65@1260@1

(01) 2019-12-18 23:28:34 Slp: Parameter 4 : 0x24BDAA65@1260@1

(01) 2019-12-18 23:28:34 Slp: Parameter 5 : HkPerfCountersConfigAction_repair_postmsi_Engine

(01) 2019-12-18 23:28:34 Slp: Parameter 6 : 0x8EB6AD9B

(01) 2019-12-18 23:28:34 Slp: Parameter 7 : 0x1295D014

(01) 2019-12-18 23:28:34 Slp: Parameter 8 : 0x1295D014

(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Wow6432Node_Microsoft_Microsoft SQL Server.reg_
(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Wow6432Node_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2019-12-18 23:28:36 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20191218_232420\Registry_SOFTWARE_Wow6432Node_Microsoft_MSSQLServer.reg_
(01) 2019-12-18 23:28:37 Slp: PerfLib 2.0 counter removal failed with exit code 2. Command line: C:\WINDOWS\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\120\Shared\
(01) 2019-12-18 23:28:37 Slp: Watson bucket for exception based failure has been created


Friday, December 20, 2019 8:58 AM

Hi Kingsql,

>> How can I show you the detail.txt file ?

You can try to share it to us via some trusted network disk.

>> PerfLib 2.0 counter removal failed with exit code 2

Code 2 means "The system cannot find the file specified. Indicates that the file can not be found in specified location." Please download the SQL Server 2014 setup media again and run it as administrator.  During the installation, please set the startup type to AUTOMATIC. Some anti-virus software may freeze SQL Server installation. Please disable the anti-virus software and re-enable it after SQL server 2014 installation. 

Best regards,
Cathy 

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com


Monday, December 23, 2019 4:47 AM

Hi Kingsql,

Any update? Did you resolve your issue? If you have resolved your issue, please mark the useful reply as answer. This can be beneficial to other community members reading the thread.
In addition, if you have another questions, please feel free to ask.
Thanks for your contribution.

Best regards,
Cathy 

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com