Grants and synonyms

Suppose I am plsql user and I have manage_items package.
Granting EXECUTE privilege to purchasing user;
syntax :
GRANT EXECUTE ON manage_items TO purchasing;

How purchasing user can use manage_items ?
DESCRIBE plsql.manage_items

You can dispense with the schema name and component selector by
creating a SYNONYM in the purchasing schema.
How to create synonym for plsql.manage_items ?
CREATE SYNONYM manage_items FOR plsql.manage_items;
now new way of describe would be
DESCRIBE manage_items

Grant the EXECUTE privilege to all other users :
GRANT EXECUTE ON manage_items TO PUBLIC;

You can find GRANT definitions in the user_tab_privs
administrative view.
SYNONYM values are in the USER_SYNONYMS view.

This entry was posted in Oracle. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s