I have to write to the registry on my SQL 2014 machine. I took the code from my older SQL 2012 machine; however on the SQL 2014 it doesn't work because I get 'Access is denied.'
@rootkey = 'HKEY_LOCAL_MACHINE',
@key = 'SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources',
@value_name = @pbxNaam,
@type = 'REG_SZ',
@value = 'MySQL ODBC 5.1 Driver'
Msg 22002, Level 16, State 1, Line 7
RegCreateKeyEx() returned error 5, 'Access is denied.'
What configuration is needed to solve the problem?