Re: non-sa users get access denied in OLE DB query
- From: "Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx>
- Date: Sun, 11 Feb 2007 16:15:03 +0100
i search the registry for DisallowAdhocAccess and I found that under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL.1\Providers
there is a whole list of providers. Of these SQLNLCI has
DisallowAdhocAccess
set to 0, but the others not. I did a test with a plain-test user, and
it was able to use OPENROWSET with SQLNCLI, but not with MSDASQL that
did not have DisallowAdhocAccess listed.
Yes, you nailed it. In BOL, it also stands "This option controls the ability
of non-administrators to run ad hoc queries. Administrators are not affected
by this option." In addition, there is a funny thing: you can set this
option to 1 through SSMS (Server Objects - Linked Servers - Providers -
properties of a specific provider). When you check the checkbox, SSMS
creates the registry key. However, you cannot set it to 0 with SSMS. When
you uncheck the checkbox, SSMS deletes the key. So the only option to set it
to 0 is with registry editor (ok, or with SMO, I guess). Not very
recommendable.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
.
- Follow-Ups:
- Re: non-sa users get access denied in OLE DB query
- From: Erland Sommarskog
- Re: non-sa users get access denied in OLE DB query
- References:
- Re: non-sa users get access denied in OLE DB query
- From: Dejan Sarka
- Re: non-sa users get access denied in OLE DB query
- From: Erland Sommarskog
- Re: non-sa users get access denied in OLE DB query
- Prev by Date: Re: SQL SOX audit and logging
- Next by Date: Re: non-sa users get access denied in OLE DB query
- Previous by thread: Re: non-sa users get access denied in OLE DB query
- Next by thread: Re: non-sa users get access denied in OLE DB query
- Index(es):