Re: Security: Accessing data in another db
From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 08/05/05
- Previous message: Hari Prasad: "Re: Alter Table"
- In reply to: Craig HB: "Security: Accessing data in another db"
- Next in thread: Craig HB: "Re: Security: Accessing data in another db"
- Reply: Craig HB: "Re: Security: Accessing data in another db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 4 Aug 2005 19:05:41 -0500
With SQL Server 2000 SP3, you can enable cross-database chaining in these
databases. This will eliminate the need for permissions on indirectly
referenced objects as long as the objects involved have the same owner
(owners map to the same login).
If your objects are owned by 'dbo', the database owners need to be the same
so that the dbo user maps to the same login. You can execute
sp_changedbowner if needed to specify the common database owner login,
Note that you should enable cross-database chaining only if you fully trust
those users that have permissions to create dbo-owned objects. In the case
of sa-owned databases, only sysadmin role members should be permitted to
create dbo-owned objects in those databases.
-- Hope this helps. Dan Guzman SQL Server MVP "Craig HB" <CraigHB@discussions.microsoft.com> wrote in message news:7D9E8085-C017-4879-942C-EA903143DD94@microsoft.com... > For all our ASP.Net applications we use a user called 'AppUser' to connect > to > the database, which only has execute permissions on the stored procedures. > This makes sure that client apps only connect to the server via stored > procedures. > > I keep this up-to-date by running a stored procedure that revokes all > permissions from AppUser and then grants execute permissions for AppUser > on > stored procedures. > > The problem I am getting is when a stored procedure in one database needs > to > access a table in another database. For this to work, AppUser needs SELECT > permission on that table (in the other database), otherwise the stored > procedure fails. But I want to try and keep AppUser's access limited to > execute permissions on stored procedures. > > Is there a way that AppUser can access data from another database (and it > only has exec permissions on that other database's stored procedures) ? > > Thanks, > Craig
- Previous message: Hari Prasad: "Re: Alter Table"
- In reply to: Craig HB: "Security: Accessing data in another db"
- Next in thread: Craig HB: "Re: Security: Accessing data in another db"
- Reply: Craig HB: "Re: Security: Accessing data in another db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|