Error: 17053 -UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered, messages

Published 05-21-2021 06:13 AM 556 Views
Microsoft

Recently we have fixed an very interesting issue for a customer. ; sharing the details below

 

ISSUE:

SQL Server generates below error for every one minute.

 

2021-05-20 08:15:09.96 spid32s Error: 17053, Severity: 16, State: 1.
2021-05-20 08:15:09.96 spid32s UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.
2021-05-20 08:16:10.08 spid24s Error: 17053, Severity: 16, State: 1.
2021-05-20 08:16:10.08 spid24s UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

 

Even though there is no impact these messages fill up the error log and are noisy. 

 

Background:

 

Every 1 minute, SQL wakes up and updates the Process ID and the Uptime in the registry keys

 

Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer


Name: uptime_pid
Type: REG_DWORD
Data: 0x1a5c


Name: uptime_time_utc
Type: REG_BINARY
Data: 00000000 98 61 19 0e 42 4e d7 01 -

 

Troubleshooting and solution :

  1. SQL Server writes the PID and Uptime of SQL process to Registry key for every one minute and this operation is failing with “Access denied” hence the error.
  2. We provided permission to the SQL Service Account on the required registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer)  but it didn’t fix the issue.
  3. From the process monitor, it has been identified that Office components are interacting with SQL Server while writing the data to registry key.
  4. We have identified that SQL Server is using MS Office components to import and export data into Excel through BULK Insert queries. So we couldn’t uninstall Office.
  5. The Office has been upgraded to latest version but still the issue persists
  6. Upon further investigation, we have identified that Office is using Virtual registry and we need to bypass it.
  7. For the same we have added (Don't overwrite it) the required SQL reg key(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer) to the list of exceptions at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\AppV\Subsystem\VirtualRegistry under “passthroughPaths” and this fixed the issue. 

 

Thanks,

Rambabu Yalla

Support Escalation Engineer

SQL Server Team

%3CLINGO-SUB%20id%3D%22lingo-sub-2375619%22%20slang%3D%22en-US%22%3EError%3A%2017053%20-UpdateUptimeRegKey%3A%20Operating%20system%20error%205(Access%20is%20denied.)%20encountered%2C%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375619%22%20slang%3D%22en-US%22%3E%3CP%3ERecently%20we%20have%20fixed%20an%20very%20interesting%20issue%20for%20a%20customer.%20%3B%20sharing%20the%20details%20below%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EISSUE%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ESQL%20Server%20generates%20below%20error%20for%20every%20one%20minute.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2021-05-20%2008%3A15%3A09.96%20spid32s%20Error%3A%2017053%2C%20Severity%3A%2016%2C%20State%3A%201.%3CBR%20%2F%3E2021-05-20%2008%3A15%3A09.96%20spid32s%20UpdateUptimeRegKey%3A%20Operating%20system%20error%205(Access%20is%20denied.)%20encountered.%3CBR%20%2F%3E2021-05-20%2008%3A16%3A10.08%20spid24s%20Error%3A%2017053%2C%20Severity%3A%2016%2C%20State%3A%201.%3CBR%20%2F%3E2021-05-20%2008%3A16%3A10.08%20spid24s%20UpdateUptimeRegKey%3A%20Operating%20system%20error%205(Access%20is%20denied.)%20encountered.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEven%20though%20there%20is%20no%20impact%20these%20messages%20fill%20up%20the%20error%20log%20and%20are%20noisy.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EBackground%3A%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEvery%201%20minute%2C%20SQL%20wakes%20up%20and%20updates%20the%20Process%20ID%20and%20the%20Uptime%20in%20the%20registry%20keys%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EKey%20Name%3A%3C%2FSTRONG%3E%20HKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CMicrosoft%20SQL%20Server%5CMSSQL14.MSSQLSERVER%5CMSSQLServer%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EName%3A%20uptime_pid%3CBR%20%2F%3EType%3A%20REG_DWORD%3CBR%20%2F%3EData%3A%200x1a5c%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EName%3A%20uptime_time_utc%3CBR%20%2F%3EType%3A%20REG_BINARY%3CBR%20%2F%3EData%3A%2000000000%2098%2061%2019%200e%2042%204e%20d7%2001%20-%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETroubleshooting%20and%20solution%20%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESQL%20Server%20writes%20the%20PID%20and%20Uptime%20of%20SQL%20process%20to%20Registry%20key%20for%20every%20one%20minute%20and%20this%20operation%20is%20failing%20with%20%E2%80%9CAccess%20denied%E2%80%9D%20hence%20the%20error.%3C%2FLI%3E%0A%3CLI%3EWe%20provided%20permission%20to%20the%20SQL%20Service%20Account%20on%20the%20required%20registry%20key%20(HKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CMicrosoft%20SQL%20Server%5CMSSQL14.MSSQLSERVER%5CMSSQLServer)%26nbsp%3B%20but%20it%20didn%E2%80%99t%20fix%20the%20issue.%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20process%20monitor%2C%20it%20has%20been%20identified%20that%20Office%20components%20are%20interacting%20with%20SQL%20Server%20while%20writing%20the%20data%20to%20registry%20key.%3C%2FLI%3E%0A%3CLI%3EWe%20have%20identified%20that%20SQL%20Server%20is%20using%20MS%20Office%20components%20to%20import%20and%20export%20data%20into%20Excel%20through%20BULK%20Insert%20queries.%20So%20we%20couldn%E2%80%99t%20uninstall%20Office.%3C%2FLI%3E%0A%3CLI%3EThe%20Office%20has%20been%20upgraded%20to%20latest%20version%20but%20still%20the%20issue%20persists%3C%2FLI%3E%0A%3CLI%3EUpon%20further%20investigation%2C%20we%20have%20identified%20that%20Office%20is%20using%20Virtual%20registry%20and%20we%20need%20to%20bypass%20it.%3C%2FLI%3E%0A%3CLI%3EFor%20the%20same%20we%20have%20added%20%3CSTRONG%3E(Don't%20overwrite%20it)%3C%2FSTRONG%3E%20the%20required%20SQL%20reg%20key(%3CSTRONG%3EHKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CMicrosoft%20SQL%20Server%5CMSSQL14.MSSQLSERVER%5CMSSQLServer%3C%2FSTRONG%3E)%20to%20the%20list%20of%20exceptions%20at%20%3CSTRONG%3EHKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5COffice%5CClickToRun%5CREGISTRY%5CMACHINE%5CSoftware%5CMicrosoft%5CAppV%5CSubsystem%5CVirtualRegistry%3C%2FSTRONG%3E%20under%20%E2%80%9CpassthroughPaths%E2%80%9D%20and%20this%20fixed%20the%20issue.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ERambabu%20Yalla%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ESupport%20Escalation%20Engineer%3C%2FP%3E%0A%3CP%3ESQL%20Server%20Team%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2375619%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎May 21 2021 06:14 AM
Updated by: