Create a User in an Oracle Database

Three basic types of users to create in oracle are 1) A read only user, 2) A Developer user and 3) An admin user. Here are examples of each.

Steps

  1. To Create a Read-Only user you do the following two steps:
    • Create user Alan_K identified by this_is_my_password;
    • Grant connect to Alan_K;
  2. To Create a Developer user you do the following two steps:
    • Create user Alan_K identified by this_is_my_password;
    • Grant connect,resource to Alan_K;
  3. To Create an Admin user you do the following two steps:
    • Create user Alan_K identified by this_is_my_password;
    • Grant connect,resource,dba to Alan_K;

Tips

  • These users default to the users tablespace, you can create a user in a dedicated tablespace with:
    1. Create tablespace data01 datafile '/u01/oracle/oradata/data01.dbf' size 1m;
    2. alter database datafile '/u01/oracle/oradata/data01.dbf' autoextend on next 500m maxsize unlimited;
    3. Create user Alan_K identified by this_is_my_password default tablespace data01;

Related Articles