Grant permissions for a User

In order for a user to do things, that user must be granted the necessary permissions. The following example grants the CREATE SESSION permission to tom:


CREATE USER tom IDENTIFIED BY Jerry;

SQL> GRANT CREATE SESSION TO tom;

Grant succeeded.

SQL>

The following example creates the users and grants the CREATE SESSION privilege to those users:


SQL> CREATE USER user1 IDENTIFIED BY password1;

User created.

SQL> CREATE USER user2 IDENTIFIED BY password2;

User created.

SQL> GRANT CREATE SESSION TO user1, user2;

Grant succeeded.

SQL>
Home »
Oracle »
User, Privilege, Role » 

User:
  1. Creating a User
  2. Grant permissions for a User
  3. Changing a User's Password
  4. PASSWORD command
  5. Deleting a User
Related: