Name

CREATE/ALTER/DROP USER

Synopsis

CREATE Syntax:

CREATE USER username
[IDENTIFIED {BY password | EXTERNALLY | GLOBALLY AS 'external_name'}]
[DEFAULT TABLESPACE tablespace_name]
[TEMPORARY TABLESPACE tablespace_name]
[QUOTA [integer [K | M] | UNLIMITED] ON tablespace_name]
 [QUOTA [integer [K | M] | UNLIMITED] ON tablespace_name]...]
[PROFILE profilename]
[PASSWORD EXPIRE] [ACCOUNT {LOCK | UNLOCK}]

ALTER Syntax:

ALTER USER username
[REPLACE old_password]
[IDENTIFIED {BY password | EXTERNALLY | GLOBALLY AS 'external_name'}]
[DEFAULT TABLESPACE tablespace_name]
[TEMPORARY TABLESPACE tablespace_name]
[QUOTA [integer [K | M] | UNLIMITED] ON tablespace_name]
 [QUOTA [integer [K | M] | UNLIMITED] ON tablespace_name]...]
[PROFILE profilename]
[PASSWORD EXPIRE] [ACCOUNT {LOCK | UNLOCK}]
[DEFAULT ROLE 
 {rolename[,rolename ...] 
 | ALL [EXCEPT rolename[,rolename ...]] 
 |          NONE
 }]
[username [,username ...] proxy_clause]

DROP Syntax:

DROP USER username [CASCADE]

Creates, modifies, or removes a database user together with associated security and storage properties.

Keywords

IDENTIFIED BY

Specifies how the user will be authenticated. There are three options for authentication:

PASSWORD

Identified with a locally stored password. The password can contain only single-byte characters from the database character set.

EXTERNALLY

Identified by an external service, such as the operating system. If you want the user to have access only through the operating system account, add the OS_AUTHENT_PREFIX parameter value ...

Get Oracle in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.