acorum
2004-07-22 00:37:00 UTC
I am trying to write to the registry via query analyzer
with an sql server extended stored procedure (xp_regwrite)
which, on all other on a different domain server, works
without incident. However, on all servers on one
particular domain, the following error results:
Server: Msg 22002, Level 16, State 1, Line 0
RegCreateKeyEx() returned error 5, 'Access is
denied.
I know that RegCreateKey is a windows api that xp_regwrite
employs.
The service accounts are domain accounts that are members
of the server machine's Windows local administrators fixes
server role, and still this doesn't work.
This error occurs when connected via query analyzer either
as the windows authenticated user that sql server and sql
agent run under or as sa logged into sqlserver. In either
case, I am executing this Furthermore, this behavior is
the same regardless of whether I am logged on the host Sql
Server machine machine (windows login, now) under my own
personal account or the sql server's service acount, or
whether I am doing this from on the actual server machine
or from some other machine via query analyzer.
If I log onto windows on the same server via the service
accounts and run regedit, I have no problem writing to the
registry, but xp_regwrite doesn't work when I run it via
query analyzer.
If I explicitly grant full control to the service accunt
via regedt32, to the key I am trying to add string values
to,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\Co
nnectTo, things work.
When I look this error up on support.microsoft.com or
google or anywhere else, I get the same remedy: make the
service account a member of the local machine's
administrators role. However, again, the service accounts
are already a member of the local administrators role and
shouldn't need specific assigned permissions on these
registry keys. Again, these work on all machines on
another domain that are configured the same with respect
to the service accounts, sql server versions, service
packs and OS service packs.
Any ideas?
Thanks in advance
with an sql server extended stored procedure (xp_regwrite)
which, on all other on a different domain server, works
without incident. However, on all servers on one
particular domain, the following error results:
Server: Msg 22002, Level 16, State 1, Line 0
RegCreateKeyEx() returned error 5, 'Access is
denied.
I know that RegCreateKey is a windows api that xp_regwrite
employs.
The service accounts are domain accounts that are members
of the server machine's Windows local administrators fixes
server role, and still this doesn't work.
This error occurs when connected via query analyzer either
as the windows authenticated user that sql server and sql
agent run under or as sa logged into sqlserver. In either
case, I am executing this Furthermore, this behavior is
the same regardless of whether I am logged on the host Sql
Server machine machine (windows login, now) under my own
personal account or the sql server's service acount, or
whether I am doing this from on the actual server machine
or from some other machine via query analyzer.
If I log onto windows on the same server via the service
accounts and run regedit, I have no problem writing to the
registry, but xp_regwrite doesn't work when I run it via
query analyzer.
If I explicitly grant full control to the service accunt
via regedt32, to the key I am trying to add string values
to,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\Co
nnectTo, things work.
When I look this error up on support.microsoft.com or
google or anywhere else, I get the same remedy: make the
service account a member of the local machine's
administrators role. However, again, the service accounts
are already a member of the local administrators role and
shouldn't need specific assigned permissions on these
registry keys. Again, these work on all machines on
another domain that are configured the same with respect
to the service accounts, sql server versions, service
packs and OS service packs.
Any ideas?
Thanks in advance