Name
CREATE/ALTER/DROP USER
Synopsis
CREATE Syntax:
CREATE USERusername[IDENTIFIED {BYpassword| EXTERNALLY | GLOBALLY AS 'external_name'}] [DEFAULT TABLESPACEtablespace_name] [TEMPORARY TABLESPACEtablespace_name] [QUOTA [integer[K | M] | UNLIMITED] ONtablespace_name] [QUOTA [integer[K | M] | UNLIMITED] ONtablespace_name]...] [PROFILEprofilename] [PASSWORD EXPIRE] [ACCOUNT {LOCK | UNLOCK}]
ALTER Syntax:
ALTER USERusername[REPLACE old_password] [IDENTIFIED {BYpassword| EXTERNALLY | GLOBALLY AS 'external_name'}] [DEFAULT TABLESPACEtablespace_name] [TEMPORARY TABLESPACEtablespace_name] [QUOTA [integer[K | M] | UNLIMITED] ONtablespace_name] [QUOTA [integer[K | M] | UNLIMITED] ONtablespace_name]...] [PROFILEprofilename] [PASSWORD EXPIRE] [ACCOUNT {LOCK | UNLOCK}] [DEFAULT ROLE {rolename[,rolename...] | ALL [EXCEPTrolename[,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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access