Oracle – How to create a user in Oracle 11g and grant permissions

access-controloracleoracle11g

Can someone advise me on how to create a user in Oracle 11g and only grant that user the ability only to execute one particular stored procedure and the tables in that procedure.

I am not really sure how to do this!

Best Answer

Connect as SYSTEM.

CREATE USER username IDENTIFIED BY apassword;

GRANT CONNECT TO username;

GRANT EXECUTE on schema.procedure TO username;

You may also need to:

GRANT SELECT [, INSERT] [, UPDATE] [, DELETE] on schema.table TO username;

to whichever tables the procedure uses.