Random Oracle notes – creating a user and granting privileges

As a developer I normally get to work with Oracle in a db that’s already been set up, my user is set up with the correct permissions etc. I’ve been working with Oracle Express installed on my own machine, and had to do a few basic steps to get up and running.

Log on as system to create new users and grant privs:

sqlplus system/yourpassword
create user youruser identified by yourpassword;
grant connect to youruser;
grant resource to youruser; -- grants a bunch of normal privs, select, insert, delete etc

Logon as sysdba to grant execute on DBMS_SESSION:

sqlplus system/yourpassword as sysdba
grant execute on DBMS_SESSION to youruser;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.