1

I have a public user and need to exec xp_regread. However I keep getting the error

xp_regread() returned error 5, 'Access is denied.'

even though I granted the exec permission to that user & read permission for the registry key.

USE master
GO
GRANT EXECUTE ON [sys].[xp_regread] TO [domain\user]
GO

Can anyone give me some advise?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
trung tang
  • 21
  • 2
  • 1
    This error is probably not due to security within SQL Server, but instead Windows security related to the permissions on the registry keys as relates to the use under which SQL Server process is running. https://stackoverflow.com/questions/29712281/xp-regread-returned-error-5-access-is-denied#29714955 – Mitch Wheat Sep 11 '18 at 03:56
  • Thanks Mitch, I set "Full Control" permission for the service account that SQL server and SQL server agent used but it still doesn't work. – trung tang Sep 12 '18 at 03:55

0 Answers0