0

When upgrading to CU8 on 2016SP2, I get the following error

Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files. (01) 2019-08-22 21:44:14 Slp: Error result: -2058354685 (01) 2019-08-22 21:44:14 Slp: Result facility code: 1360 (01) 2019-08-22 21:44:14 Slp: Result error code: 3

From searching it seems this error is only existent in 2008R2, and is an issue with the performance monitor file in system32, which the fix tells you to rename, then repair the update.

As we have 5 databases on this server running in 2008R2 compatibility mode, I thought it was worth a shot.

I renamed this file to perf-MSSQL13.MSSQLSERVER-sqlagtctr-renamed (as the fix in the article doesn't specify what it should be renamed to?), and RERAN (as i don't know how to repair a SQL update - only a SQL installation?) the update, and the same (apparently incorrectly thus erroring) file was recreated at the same location, beside the old file that I renamed, and the installation finished with the same failure error.

The funny thing is that the instance works (apparently) perfectly - SELECT @@VERSION shows that CU8 has been successfully applied. But problems down the line may emerge - I'd obviously rather have a clean success.

Any help with this would be much appreciated!

Edit: The detail file says:

Running Action: CopyPerfCounterDllToSystemDir
(01) 2019-08-22 21:43:57 Slp: Copying file from 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll.
(01) 2019-08-22 21:43:57 Slp: Sco: Attempting to RobustCopy source file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to target file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:57 Slp: Sco: Attempting to VersionCopy source file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to target file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:57 Slp: Sco: File 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' does not exist
(01) 2019-08-22 21:43:57 Slp: Sco: Attempting to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:58 Slp: Sco: Attempt to RobustCopy failed.
Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
   at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.VersionCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp: Sco: Attempt to VersionCopy failed.
Microsoft.SqlServer.Configuration.Sco.FailedToVersionCopyException: The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed. ---> Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
   at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.VersionCopyTo(String targetFile)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.VersionCopyTo(String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp: Sco: Attempting to RenameCopy source file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to target file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:58 Slp: Sco: Attempting to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:58 Slp: Sco: Attempt to RobustCopy failed.
Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
   at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RenameCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp: Sco: Attempt to RenameCopy failed.
Microsoft.SqlServer.Configuration.Sco.FailedToRenameCopyException: The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed. ---> Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
   at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RenameCopyTo(String targetFile)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RenameCopyTo(String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp: Sco: Attempting to RebootCopy source file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to target file 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
(01) 2019-08-22 21:43:58 Slp: Sco: Attempting to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to file 'C:\Windows\system32\xgsdk13f.v0d'
(01) 2019-08-22 21:43:58 Slp: Sco: Attempt to RobustCopy failed.
Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
   at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
   at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
   at Microsoft.SqlServer.Configuration.Sco.SqlFile.RebootCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp: Error: Action "Microsoft.SqlServer.Configuration.ScoExtension.CopyFileAction" threw an exception during execution.
(01) 2019-08-22 21:43:58 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: File C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll could not be copied to file path C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll. ---> Microsoft.SqlServer.Configuration.ScoExtension.CopyFileFailedException: File C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll could not be copied to file path C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll. ---> Microsoft.SqlServer.Configuration.Sco.FailedToRobustCopyException: The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed. ---> Microsoft.SqlServer.Configuration.Sco.FailedToRebootCopyException: The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed. ---> Microsoft.SqlServer.Configuration.Sco.ScoException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. ---> System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
(01) 2019-08-22 21:43:58 Slp:    at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
(01) 2019-08-22 21:43:58 Slp:    at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
(01) 2019-08-22 21:43:58 Slp:    at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
(01) 2019-08-22 21:43:58 Slp:    at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
(01) 2019-08-22 21:43:58 Slp:    --- End of inner exception stack trace ---
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.RebootCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:    --- End of inner exception stack trace ---
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.RebootCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:    --- End of inner exception stack trace ---
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.ScoExtension.CopyFileAction.ExecuteAction(String actionId)
(01) 2019-08-22 21:43:58 Slp:    --- End of inner exception stack trace ---
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Configuration.ScoExtension.CopyFileAction.ExecuteAction(String actionId)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
(01) 2019-08-22 21:43:58 Slp:    --- End of inner exception stack trace ---
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
(01) 2019-08-22 21:43:58 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
(01) 2019-08-22 21:43:58 Slp: The configuration failure category of current exception is ConfigurationFailure
(01) 2019-08-22 21:43:58 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2019-08-22 21:43:58 Slp: Inner exceptions are being indented
(01) 2019-08-22 21:43:58 Slp: 
(01) 2019-08-22 21:43:58 Slp: Exception type: Microsoft.SqlServer.Configuration.ScoExtension.CopyFileFailedException
(01) 2019-08-22 21:43:58 Slp:     Message: 
(01) 2019-08-22 21:43:58 Slp:         File C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll could not be copied to file path C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll.
(01) 2019-08-22 21:43:58 Slp:     HResult : 0x85500003
(01) 2019-08-22 21:43:58 Slp:         FacilityCode : 1360 (550)
(01) 2019-08-22 21:43:58 Slp:         ErrorCode : 3 (0003)
(01) 2019-08-22 21:43:58 Slp:     Data: 
(01) 2019-08-22 21:43:58 Slp:       SourceFilePath = C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:       TargetFilePath = C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll
(01) 2019-08-22 21:43:58 Slp:       WatsonData = Microsoft.SqlServer.Configuration.ScoExtension.CopyFileFailedException@3
(01) 2019-08-22 21:43:58 Slp:       WatsonConfigActionData = PATCH@CONFIGRC@MPT_AGENT_CORE_CNI
(01) 2019-08-22 21:43:58 Slp:       WatsonExceptionFeatureIdsActionData = System.String[]
(01) 2019-08-22 21:43:58 Slp:       SQL.Setup.FailureCategory = ConfigurationFailure
(01) 2019-08-22 21:43:58 Slp:     Stack: 
(01) 2019-08-22 21:43:58 Slp:         at Microsoft.SqlServer.Configuration.ScoExtension.CopyFileAction.ExecuteAction(String actionId)
(01) 2019-08-22 21:43:58 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
(01) 2019-08-22 21:43:58 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
(01) 2019-08-22 21:43:58 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
(01) 2019-08-22 21:43:58 Slp:     Inner exception type: Microsoft.SqlServer.Configuration.Sco.FailedToRobustCopyException
(01) 2019-08-22 21:43:58 Slp:         Message: 
(01) 2019-08-22 21:43:58 Slp:                 The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed.
(01) 2019-08-22 21:43:58 Slp:         HResult : 0x86a50008
(01) 2019-08-22 21:43:58 Slp:                 FacilityCode : 1701 (6a5)
(01) 2019-08-22 21:43:58 Slp:                 ErrorCode : 8 (0008)
(01) 2019-08-22 21:43:58 Slp:         Data: 
(01) 2019-08-22 21:43:58 Slp:           sourceFile = C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:           targetFile = C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll
(01) 2019-08-22 21:43:58 Slp:           sourceFileName = sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:           WatsonData = Microsoft.SqlServer.Configuration.Sco.FailedToRobustCopyException@8
(01) 2019-08-22 21:43:58 Slp:         Stack: 
(01) 2019-08-22 21:43:58 Slp:                 at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:                 at Microsoft.SqlServer.Configuration.ScoExtension.CopyFileAction.ExecuteAction(String actionId)
(01) 2019-08-22 21:43:58 Slp:         Inner exception type: Microsoft.SqlServer.Configuration.Sco.FailedToRebootCopyException
(01) 2019-08-22 21:43:58 Slp:             Message: 
(01) 2019-08-22 21:43:58 Slp:                         The attempt to copy file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll' to 'C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll' failed.
(01) 2019-08-22 21:43:58 Slp:             HResult : 0x86a5000c
(01) 2019-08-22 21:43:58 Slp:                         FacilityCode : 1701 (6a5)
(01) 2019-08-22 21:43:58 Slp:                         ErrorCode : 12 (000c)
(01) 2019-08-22 21:43:58 Slp:             Data: 
(01) 2019-08-22 21:43:58 Slp:               sourceFile = C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\DllTmp64\sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:               targetFile = C:\Windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll
(01) 2019-08-22 21:43:58 Slp:               sourceFileName = sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:               WatsonData = Microsoft.SqlServer.Configuration.Sco.FailedToRebootCopyException@12
(01) 2019-08-22 21:43:58 Slp:             Stack: 
(01) 2019-08-22 21:43:58 Slp:                         at Microsoft.SqlServer.Configuration.Sco.SqlFile.RebootCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:                         at Microsoft.SqlServer.Configuration.Sco.SqlFile.RobustCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:             Inner exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
(01) 2019-08-22 21:43:58 Slp:                 Message: 
(01) 2019-08-22 21:43:58 Slp:                                 The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
(01) 2019-08-22 21:43:58 Slp:                 HResult : 0x84bb0001
(01) 2019-08-22 21:43:58 Slp:                                 FacilityCode : 1211 (4bb)
(01) 2019-08-22 21:43:58 Slp:                                 ErrorCode : 1 (0001)
(01) 2019-08-22 21:43:58 Slp:                 Data: 
(01) 2019-08-22 21:43:58 Slp:                   WatsonData = sqlagentctr130.dll
(01) 2019-08-22 21:43:58 Slp:                   DisableRetry = true
(01) 2019-08-22 21:43:58 Slp:                 Stack: 
(01) 2019-08-22 21:43:58 Slp:                                 at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
(01) 2019-08-22 21:43:58 Slp:                                 at Microsoft.SqlServer.Configuration.Sco.SqlFileProvider.Copy(String sourceFile, String targetFile)
(01) 2019-08-22 21:43:58 Slp:                                 at Microsoft.SqlServer.Configuration.Sco.SqlFile.RebootCopyTo(String targetFile)
(01) 2019-08-22 21:43:58 Slp:                 Inner exception type: System.Security.AccessControl.PrivilegeNotHeldException
(01) 2019-08-22 21:43:58 Slp:                     Message: 
(01) 2019-08-22 21:43:58 Slp:                                         The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
(01) 2019-08-22 21:43:58 Slp:                     HResult : 0x80070005
(01) 2019-08-22 21:43:58 Slp:                     Stack: 
(01) 2019-08-22 21:43:58 Slp:                                         at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
(01) 2019-08-22 21:43:58 Slp:                                         at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
(01) 2019-08-22 21:43:58 Slp:                                         at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
(01) 2019-08-22 21:43:58 Slp:                                         at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
(01) 2019-08-22 21:43:58 Slp:                                         at Microsoft.SqlServer.Configuration.Sco.SqlFile.CopyTo(String targetFileFullPath, Boolean bCopyAcl)
(01) 2019-08-22 21:43:58 Slp: Watson Bucket 1 
0

1 Answer 1

2

The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.

That's pretty cut and dry. Even if you're in the Administrators local group (which you should be to run setup) things like group policy can still be going on in the background and locking things down. All of the required permissions are not held by the account used. which resulted in HResult : 0x80070005 which, when translated, means ERROR_ACCESS_DENIED.

I would run repair on the installation to make sure everything is good and the perf counters show up and work without issue.

1
  • Thanks - I saw this SeSecurityPrivilige issue too - so I checked my test server, on which the update succeeded, which has the exact same settings (e.g. 'Administrators' not listed under Manage Auditing and Security Log (mapped to SeSecurityPrivilige) at Local Security Policy’ > Local Policies > User Rights Assignment so if the update succeeded there, but not in production, I'm not sure that is the issue? How do you 'Repair' a SQL Server Cumulative Upgrade? I only see people referring to repairing an install, which is not what I am doing.
    – jack
    Aug 23, 2019 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.