Re: Re:Application Role and access to 'other' databases

From: Bottomless Pit (pdurdin_at_nospam_hotmail.com)
Date: 05/19/03

  • Next message: Bryan: "Removing the sa and other users"
    Date: Mon, 19 May 2003 11:17:56 +0100
    
    

    Very weird. I've created two new databases and tested this idea. Works a
    treat. I need to figure out how to create a linked server.

    BUT when I try it on the two databases that I want to implement this
    on -----> it doesn't work. I get the message;

    Server: Msg 7415, Level 16, State 1, Line 1
    Ad hoc access to OLE DB provider 'SQLOLEDB' has been denied. You must access
    this provider through a linked server.

    Got to sort out more pressing issues - I'll have to get back to this later
    today.

    Thanks for your help,

    regards,

    Paul Durdin

    "Vishal Parkar" <vgparkar@hotmail.com> wrote in message
    news:023801c31da5$0e836f90$a501280a@phx.gbl...
    > Since you are trying to connect to other SQL Server i do
    > not think there should be any issue while setting up
    > linked server. Refer to following links.
    >
    > Refer to this url
    >
    > http://www.microsoft.com/technet/treeview/default.asp?
    > url=/technet/prodtechnol/sql/maintain/featusability/08ppcsq
    > a.asp
    >
    > Also see topics "openrowset","opendatasource", "openquery"
    > in BOL.
    >
    > --Vishal
    >
    > >-----Original Message-----
    > >I am using an application role to access the primary
    > database used by my
    > >application. This works really well and has allowed me to
    > use integrated
    > >security and give users access to the database through
    > views, but have full
    > >access the my program.
    > >
    > >I need to read data from another database on the same
    > server, which is ok
    > >normally by specifying
    > >
    > >SELECT * FROM OtherDatabase.owner.tablename
    > >
    > >However if you use an application role the integrated
    > login account no
    > >longer has access to the 'other database'.
    > >
    > >I Oracle I can create a query across databases by
    > specifying the account
    > >details for the second database, and I would like to do
    > the same in SQL
    > >Server.
    > >
    > >The other database I can connect to as a SQL Server
    > account, so something
    > >like;
    > >
    > >SELECT * FROM
    > >OtherDatabase.owner.tablename,User=UserName,Password=UserP
    > assword
    > >
    > >I have tried both linked servers and remote databases,
    > but neither seem to
    > >work on the same machine. It could be that I don't really
    > understand how it
    > >set up a linked server ok course!
    > >
    > >Any ideas anyone?
    > >
    > >regards,
    > >
    > >Paul Durdin
    > >
    > >
    > >
    > >.
    > >


  • Next message: Bryan: "Removing the sa and other users"

    Relevant Pages

    • RE: Problems with WebParts
      ... to a database called aspnetdb. ... > The connection string specifies a local SQL Server Express instance using a ... > server account must have read and write access to the applications directory. ... > This is necessary because the web server account will automatically create ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: DTS Package fails when Scheduled
      ... Apparently I was unable to pass on the database password when runninig the ... Make sure SQL Server Agent account has the correct rights/permissions. ... scheduled job under this context, I still received the error, even though I ...
      (microsoft.public.sqlserver.dts)
    • Problems with WebParts
      ... The connection string specifies a local SQL Server Express instance using a ... database location within the applications App_Data directory. ... server account must have read and write access to the applications directory. ... logged-in user needs the dbcreator privilege in the appropriate SQL Server ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: sa password was inadvertently changed. With a kicker...
      ... Use some other account that the client has (any domain admin should have ... Did around there install package, and see if the sql script that changed ... Put the database files back where they should ... > I have a SQL Server 7 Standard edition server running in a ...
      (microsoft.public.sqlserver.security)
    • Re: does sql user need to be an admin?
      ... User accounts need to be granted access to SQL Server in order to ... file permissions do not control database access. ... This account is a member of the ... Grant a Windows account access to SQL Server: ...
      (microsoft.public.sqlserver.security)