Name

ALTER USER

Synopsis

ALTER USER username
[IDENTIFIED {BY password | EXTERNALLY |
GLOBALLY} ]
   [DEFAULT TABLESPACE tablespace_name]
   [TEMPORARY TABLESPACE tablespace_name]
[QUOTA [integer[K | M] | UNLIMITED] ON
tablespace_name]
   [PROFILE profile_name]
   [DEFAULT ROLE {
[role_name[,role_name
...]] |
[ALL [EXCEPT
role_name[,role_name
...]]] | NONE}
   [PASSWORD EXPIRE]
   [ACCOUNT {LOCK | UNLOCK}

Changes the security and storage characteristics of a user (username).

Keywords

IDENTIFIED BY

Specifies that the password must be provided when enabling the role.

IDENTIFIED EXTERNALLY

Specifies that the operating system verifies the user enabling the role.

IDENTIFIED GLOBALLY

Specifies that the Oracle Security Server verifies the user enabling the role.

DEFAULT TABLESPACE

Changes the name of the tablespace (tablespace_name) that will be used by default when this user creates a database object.

TEMPORARY TABLESPACE

Changes the name of the tablespace (tablespace_name) that will be used for the creation of temporary segments for operations like sorting that require more memory than is available.

QUOTA

Specifies the amount of space this user is permitted to use for object storage in the specified tablespace. UNLIMITED means there is no limit to the storage used, subject to the total size of the tablespace.

PROFILE

Changes the user’s profile to profile_name, which subjects the user to the limits specified in that profile.

DEFAULT ROLE

Specifies the roles assigned to the user as default roles. ALL means that all roles granted to the user will be default roles except those specified in the EXCEPT clause, and NONE means that none of the roles granted to the user will be default roles.

PASSWORD EXPIRE

Causes the userid’s password to expire. It will have to be reset before the user can connect to the database.

ACCOUNT LOCK

Causes the account to be locked and disabled. The account will have to be unlocked with the ALTER USER .... ACCOUNT UNLOCK command.

ACCOUNT UNLOCK

Causes the account to be unlocked. This is the default.

Note

You can change your own password, but you must have the ALTER USER privilege to use any other operations of this command.

Examples

The following example assigns a new password to scott:

ALTER USER scott IDENTIFIED BY lion

The following example changes the default and temporary tablespaces for user scott:

ALTER USER scott
   TEMPORARY TABLESPACE temp
   DEFAULT TABLESPACE users:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset