Re: Stored Prcedure Security
From: Mike John (Mike.John_at_knowledgepool.com)
Date: 09/24/04
- Next message: FWalton: "RE: Bulk Copy / BCP problem....please advise"
- Previous message: Angel: "Update selected tables???"
- In reply to: Tom Cuomo: "Stored Prcedure Security"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 22:52:13 +0100
There is a section in BOL regarding cross database ownership chains and the
behavour in this area changed with SP3. If I remember rightly you will need
to enable cross database ownership chains and ensure BOTH dbs are owned by
the same login , then you will not need to grant rights explicitly to the
user in the other db.
Sorry to be vague, but it isone of those things you set up once, and when
done tend to forget.
Mike John
"Tom Cuomo" <anonymous@discussions.microsoft.com> wrote in message
news:306a01c4a243$c22aa620$a601280a@phx.gbl...
>I have a stored procedure that selects from tables in
> multiple databases on the same server. The stored
> procedure is cataloged in one of the databases.
>
> For example: The stored procedure TESTA is cataloged in
> cede_70 by cede_70_dbo who is the dbo of both databases
>
> create procedure dbo.TESTA
> as
>
> select *
> from cede_70.dbo.tableA
> , cede_rpt.dbo.tableB
> where cede_70.dbo.tableA.columnone =
> cede_rpt.dbo.tableB.columnone
>
> go
> grant execute on TESTA to public
> go
>
>
> Under SQL server 2000 SP3a when someone executes the
> stored procedure TESTA it fails with a message like
> "SELECT permission denied on object 'TableB',
> database 'cede_rpt', owner 'dbo'. "
>
> The login executing the stored procedure does not have
> permission to read either table; but the login does have
> permission to execute the stored procedure, which was
> cataloged by the dbo (who has permission to read both
> tables). It is the read of the table from the 'other'
> database (the one without the stored procedure) which
> fails.
>
> Should I really have to add the User to the
> cede_rpt.dbo.tableB database too! I thought the mere fact
> that it has EXECUTE permission to the SP would suffice!
>
- Next message: FWalton: "RE: Bulk Copy / BCP problem....please advise"
- Previous message: Angel: "Update selected tables???"
- In reply to: Tom Cuomo: "Stored Prcedure Security"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|