db_owner & multiple databases
From: Vladimri Luzhkov (vluzhkov@gw.tcs.spb.ru)
Date: 02/19/03
- Next message: Dan Guzman: "Re: db_owner & multiple databases"
- Previous message: Melany: "SQL Server Setup"
- Next in thread: Dan Guzman: "Re: db_owner & multiple databases"
- Reply: Dan Guzman: "Re: db_owner & multiple databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: vluzhkov@gw.tcs.spb.ru (Vladimri Luzhkov) Date: 19 Feb 2003 07:44:40 -0800
I'm having problem with ability to grant db_owner access for user
(USER) to only one database (database A).
The main problem is that this user must have public (for example)
access to other databases (database B).
All objects in all databases are owned by dbo.
So if this user creates stored procedure in it's own database (A) and
this stored procedure accesses to object in other database (B) user
gain access to this object in database B without checking permissions.
"Online books" tells in "ownership chains" section:
"If the same user owns a stored procedure and all the views or tables
it references, and if the procedure and objects are all in the same
database, SQL Server checks only the permissions on the procedure."
But there is no explanation (or i coudnt find it) of situation, when
objects aren't in the same database.
How can i brake an ownership chain, when it flows to another database?
4 example:
USER exists in db_owner in database A and in public in database B
We have table B.dbo.Table1 without any permissions (or even with deny
all permission to USER).
USER writes stored procedure
CREATE PROCEDURE A.dbo.prcTest AS
SELECT * FROM B.dbo.Table1
GO
And through this stored procedure by EXEC prcTest USER may read data
from Table1. :(
db_owner access to database A is needed to develop this database, and
access to database B is nedded, because SOME (not all) data in
database B is used by client applications and server-side stored
procedures in database A.
I need to maintain abilities of development database A, but to
restrict USER access to some valuable data in database B.
How can I keep it together?
- Next message: Dan Guzman: "Re: db_owner & multiple databases"
- Previous message: Melany: "SQL Server Setup"
- Next in thread: Dan Guzman: "Re: db_owner & multiple databases"
- Reply: Dan Guzman: "Re: db_owner & multiple databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|