Stored Procedure Security/Permissions
From: Tom C (anonymous_at_discussions.microsoft.com)
Date: 09/24/04
- Next message: Mike London: "Re: auditing database/server activities"
- Previous message: Mark Allison: "Re: sqlagentcmdexec"
- Next in thread: Jasper Smith: "Re: Stored Procedure Security/Permissions"
- Reply: Jasper Smith: "Re: Stored Procedure Security/Permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 24 Sep 2004 10:47:54 -0700
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: Mike London: "Re: auditing database/server activities"
- Previous message: Mark Allison: "Re: sqlagentcmdexec"
- Next in thread: Jasper Smith: "Re: Stored Procedure Security/Permissions"
- Reply: Jasper Smith: "Re: Stored Procedure Security/Permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|