Team-Fly |
Oracle PL/SQL Programming Guide to Oracle 8 i Features By Steven Feuerstein | |
Table of Contents | |
Invoker rights refers to a new model for resolving references to database elements (tables, views, objects, programs) in a PL/SQL program unit. Back in the "old days" of Oracle7 and Oracle 8.0 (those days, of course, in which most of us still spend our time), whenever you executed a stored program, it executed under the authority of the owner of that program. This was not a big deal if your entire applicationcode, data, and usersworked out of the same Oracle account, a scenario that probably covers about 0.5% of all Oracle shops . It proved to be a real pain in the neck for the other 99.5%, though, because code was usually stored in one schema and then shared through GRANT EXECUTE statements with other users (directly or through roles). For one thing, that centralized, stored code would not automatically apply the privileges of a user (also known as an invoker ) to the code's objects. The user might not have had DELETE privileges on a table, but the stored code did, so delete away! Now, in some circumstances, that is just how you wanted it to work. In other situations, particularly when you were executing programs relying on the DBMS_SQL (dynamic SQL) package, awesome complications could ensue. In Oracle 8.1, PL/SQL has now been enhanced so that at the time of compilation, you can decide whether a program (or all programs in a package) should run under the authority of the definer (the only choice in Oracle 8.0 and earlier) or of the invoker of that program. |
Team-Fly |
Top |