To Use OPENROWSET by SQL user without sysadmin role

  • Hi all,

    I need to know if are there a way to use OPENROWSET by a SQL user without sysadmin role?

    We have the problem below when the SQL user perform a quey with OPENROWSET, however when perform with sysadmin role the result when come back it is correct.

    Msg 7415, Level 16, State 1, Line 1

    Ad hoc access to OLE DB provider 'IBMDA400' has been denied. You must access this provider through a linked server.

    Our enviroment:

    Windows Server 2008 R2 64bits

    SQL Server 2008 R2 64bits

    AddhocRemoteQuerysEnabled is True

    Could someone help us, please.

    Regards,

    Antonio Estima

  • I would guess that if you goto Object Explorer -> Security -> Linked Servers -> Providers -> IBMDA400 and right-click and select properties, you will find that Disallow adhoc access is checked for this provider.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • Dear Erland,

    I have cheked it, however It has not checked

    Regards,

    Antonio Estima

  • I was able to run OPENROWSET with a non-priv user, but I don't have access to the IBMDA400 provider, and this may be a restriction related to that provider. Is it set to allow inprocess?

    Why can't you use a linked server?

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • Dear Erland,

    I checked the allow inprocess, but didn't ran correct. About to use linked server, may be not, because the developer team receaved this application with OPENROWSET and the change cost its very high to them.

    But I going to talk to them about this idea.

    Regards,

    Antonio

  • Hi All,

    Has someone another idea different of linked server?

    Regards,

    Antonio

  • Well, distributed queries, even more distributed transactions, often causes pain, so there is all reason to avoid them if you can. But if your developers have painted them so much into a corner that chaning from OPENROWSET to OPENQUERY is expensive, your prospects are bleak, since not using distributed queries at all, means a radical change in application architecture.

    The problem in your case is that are using a provider that not very many here uses, and therefore it is difficult to help you. Maybe you should open a case with Microsoft. Or with IBM, if the problem is with the OLE OB provider.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply