plsql - What are invoker's rights with respect to Oracle PL/SQL functions? -
the first of result_cache usage restrictions (--link) - not defined in module has invoker's rights or in anonymous block.
what "invoker's rights" mean ? mean user_procedures.authid shouldnt "definer" function ?
invoker , definer rights when executing oracle pl/sql code
the rule interpreting restricts usage of kinds of pl/sql code stored in database cache. types of pl/sql code included segments within:
anonymous blocks
(i.e., these code snippets run through sql plus or other input without being part of persistent object in database, such stored procedure, function or package)defined invoker's rights
: (see below explanation)
an invoker
means whatever user
account executes pl/sql object, procedure runs privileges of user account instead of customary privileges of definer
(owner of object).
tom kyte has a discussion thread on topic of definer vs. invoker rights on ask-tom site.
the notable comment above reference example block of code:
in above, if user1 created: create or replace procedure proc1 authid current_user begin x in ( select * my_table ) loop null; end loop; end; /
in following line: authid current_user
, comment setting invoker's rights. table my_table
in reference has multiple possibilities:
- when
proc1
executed definer , invoker same, (i.e.,owner
oruser1
) table be:user1.my_table
- when
proc1
executed invoker or user otherowner
of procedureproc1
, (i.e.,user2
) table can 1 of these possible targets:- a
public
owned table namedmy_table
- a private or publicly owned
synonym
table typed object calledmy_table
- a local table owned
user2
(i.e.,user2.my_table
) of same name,my_table
.
- a
if above cases true, there great deal of ambiguity surrounding reference involved procedure user1.proc1
. actual, physical table being used different based on context of invoking user identity , accessibility/existence of aliased pointers (synonyms
).
the result usefulness of cached value procedure invoker's rights enabled questionable given variable nature of internal references.
Comments
Post a Comment