Subject | grant on stored proc |
---|---|
Author | Ryan Nilsson-Harding |
Post date | 2002-09-26T01:56:10Z |
Hi there,
My understanding of the line below (taken from "Working with stored
procedures" in the Devel. Guide)
"Stored procedures themselves sometimes need access to tables or
views for which a user does not - or should not - have privileges."
is that I can deny a user direct access to a table, but allow that
person to execute a stored procedure, which has access to the table.
I have such a circumstance, but I am getting the "permission denied"
error.
My scenario is:
USER: MICK
ROLE: STORE
TABLE: EXCH
SP: UPD_LAST_USE
GRANT STORE TO MICK
GRANT ALL ON EXCH TO UPD_LAST_USE
GRANT EXECUTE ON PROCEDURE UPD_LAST_USE TO PUBLIC
NB: EXCH is the only table touched by UPD_LAST_USE
But when I login as MICK, using role STORE and execute the stored
proc, I get the permission denied error.
Why is this, when the sp has ALL access to EXCH, and the role STORE
has EXECUTE on UPD_LAST_USE??
Rgds,
-Ryan
My understanding of the line below (taken from "Working with stored
procedures" in the Devel. Guide)
"Stored procedures themselves sometimes need access to tables or
views for which a user does not - or should not - have privileges."
is that I can deny a user direct access to a table, but allow that
person to execute a stored procedure, which has access to the table.
I have such a circumstance, but I am getting the "permission denied"
error.
My scenario is:
USER: MICK
ROLE: STORE
TABLE: EXCH
SP: UPD_LAST_USE
GRANT STORE TO MICK
GRANT ALL ON EXCH TO UPD_LAST_USE
GRANT EXECUTE ON PROCEDURE UPD_LAST_USE TO PUBLIC
NB: EXCH is the only table touched by UPD_LAST_USE
But when I login as MICK, using role STORE and execute the stored
proc, I get the permission denied error.
Why is this, when the sp has ALL access to EXCH, and the role STORE
has EXECUTE on UPD_LAST_USE??
Rgds,
-Ryan