This article is contributed. See the original author and article here.

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_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLServer



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_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLServer)  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_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLServer) to the list of exceptions at HKEY_LOCAL_MACHINESOFTWAREMicrosoftOfficeClickToRunREGISTRYMACHINESoftwareMicrosoftAppVSubsystemVirtualRegistry under “passthroughPaths” and this fixed the issue. 


 


Thanks,


Rambabu Yalla


Support Escalation Engineer


SQL Server Team

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.