Oracle PL/SQL - Controlling access to packages

Introduction

You can control access to package code in one of two ways: a simple command or a wrapper package.

To grant a user rights to access a particular package, grant those rights by using the following command:

grant execute on package_name to user

Rights must be granted to an entire package.

To revoke grants from a user, use the following command:

revoke execute on package_name from user

The following code shows some examples of granting and revoking privileges:

SQL> grant execute on pkg_emp to hr;
Grant succeeded.
SQL> revoke execute on pkg_emp from hr;
Revoke succeeded.
SQL>

Related Topic