CREATE USER
Purpose
Use this statement to add users to the database.
Prerequisite
You must have the system privilege CREATE USER.
Syntax
create_user::=
Usage notes
- The system privilege
CREATE SESSIONmust always be granted for the user to be able to log in. -
User names are restricted by the same rules as SQL identifiers, except that user names are case insensitive even when delimited by quotation marks. For example, the usernames
Test
,TEST
, andtest
are synonymous.To learn more, see SQL identifier.
- A user will not be automatically associated with a schema when created.
- A user can be altered using the ALTER USER command and renamed using the RENAME command.
- For information about database users, refer to the system tables EXA_DBA_USERS, EXA_ALL_USERS, and EXA_USER_USERS.
- For details about password security (complexity, expiry, locking accounts), see Database users and roles and Privileges.
- Users created outside of the SaaS web console are not managed or visible in the web console. These users must be managed manually using SQL commands.
- Users created outside of the SaaS web console are subject to the same IP address restrictions as users created from the SaaS web console. The IP address of the client must be added to the list of allowed addresses in SaaS before the user can connect to the database.
Authenticate with password
If the database user should authenticate with a password, use CREATE USER <username> IDENTIFIED BY <password>.
If you use delimited (quoted) identifiers, the password is case sensitive. For more information, see SQL identifier.
Example:
CREATE USER user_1 IDENTIFIED BY "h12_Xhz";
GRANT CREATE SESSION TO user_1;