Pr.Pg Next Pg

Create new User tutorials

 

  • Use the CREATE USER statement to create and configure a database user, which is an account through which you can log in to the database, and to establish the means by which Oracle Database permits access by the user.

  • The syntax for the CREATE USER statement is:

CREATE USER user_name

IDENTIFIED { BY password }

| DEFAULT TABLESPACE tablespace

| TEMPORARY TABLESPACE

{ tablespace | tablespace_group }

| ACCOUNT { LOCK | UNLOCK }

] ;

  • Where

User:

  • Specify the name of the user to be created. Oracle recommends that the user name contain at least one single-byte character regardless of whether the database character set also contains multibyte characters.

 

IDENTIFIED Clause:

  • The IDENTIFIED clause lets you indicate how Oracle Database authenticates the user.


BY password:

  • The BY password clause lets you creates a local user and indicates that the user must specify password to log on to the database. Passwords are case sensitive.

 

DEFAULT TABLESPACE Clause:

  • Specify the default tablespace for objects that the user creates. If you omit this clause, then the user's objects are stored in the database default tablespace. If no default tablespace has been specified for the database, then the user's objects are stored in the SYSTEM tablespace.

 

TEMPORARY TABLESPACE Clause:

  • Specify the tablespace or tablespace group for the user's temporary segments. If you omit this clause, then the user's temporary segments are stored in the database default temporary tablespace.


ACCOUNT Clause

  • Specify ACCOUNT LOCK to lock the user's account and disable access. Specify ACCOUNT UNLOCK  to unlock the user's account and enable access to the account.

 

Pr.Pg border                                              Next Pg