Re: OPENROWSET/OPENDATASOURCE
From: Gary (clgary_at_yahoo.com)
Date: 05/31/05
- Next message: Lionel Horn: "Re: Prevent Adminstrator Group Access"
- Previous message: Hari Prasad: "Re: OPENROWSET/OPENDATASOURCE"
- In reply to: Hari Prasad: "Re: OPENROWSET/OPENDATASOURCE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 31 May 2005 14:39:32 -0500
Hi,
It's a bit more complicated that that. If I grant the user executing the
statement sa privs, it will run, however, if i limit it down to select,
insert, update, delete, and execute, the error returned is
"Ad hoc access to OLE DB provider 'MSDAORA' has been denied. You must access
this provider through a linked server."
I thought as long as the reg key for DisallowAdhocAccess was set to 0, it
should work, and rely on the context of the remote server to determine if it
would work
"Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message
news:Oys8VfhZFHA.2884@tk2msftngp13.phx.gbl...
> Hi,
>
> OPENROWSET
> ----------------
>
> SELECT a.*
> FROM OPENROWSET('SQLOLEDB','DSN';'Login';'password',
> 'SELECT * FROM pubs.dbo.authors ORDER BY au_lname, au_fname') AS a
>
> Replace the DSN, Login and password with actual
>
> OPENDATASOURCE
> ----------------------------
>
> SELECT *
> FROM OPENDATASOURCE(
> 'SQLOLEDB',
> 'Data Source=ServerName;User ID=MyUID;Password=MyPass'
> ).Northwind.dbo.Categories
>
>
> See details of both command in sql server books online.
>
> Thanks
> Hari
> SQL Server MVP
>
>
> "Gary" <clgary@yahoo.com> wrote in message
> news:OjRfjbhZFHA.3788@TK2MSFTNGP15.phx.gbl...
> > Hi,
> >
> > Can anyone tell me what are the specific credentials needed for those
> > functions?
> >
> >
>
>
- Next message: Lionel Horn: "Re: Prevent Adminstrator Group Access"
- Previous message: Hari Prasad: "Re: OPENROWSET/OPENDATASOURCE"
- In reply to: Hari Prasad: "Re: OPENROWSET/OPENDATASOURCE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|