top of page
CerebroSQL

Oracle:

ALTER USER

ALTER USER
{ user
{ IDENTIFIED
{ BY password [ REPLACE old_password ]
| EXTERNALLY [ AS 'certificate_DN' | AS 'kerberos_principal_name' ]
| GLOBALLY [ AS '[directory_DN]' ]
}
| DEFAULT TABLESPACE tablespace
| TEMPORARY TABLESPACE { tablespace | tablespace_group_name }
| { QUOTA { size_clause
| UNLIMITED
} ON tablespace
} ...
| PROFILE profile
| DEFAULT ROLE { role [, role ]...
| ALL [ EXCEPT role [, role ] ... ]
| NONE
}
| PASSWORD EXPIRE
| ACCOUNT { LOCK | UNLOCK }
| ENABLE EDITIONS [ FORCE ]
} ...
| user [, user ]... proxy_clause
} ;

proxy_clause ::=
{GRANT CONNECT THROUGH { ENTERPRISE USERS | db_user_proxy db_user_proxy_clauses }
| REVOKE CONNECT THROUGH { ENTERPRISE USERS | db_user_proxy }}
db_user_proxy_clauses::=
[ WITH
{ ROLE { role_name [, role_name]...
| ALL EXCEPT role_name [, role_name]...
}
| NO ROLES
}
]
[ AUTHENTICATION REQUIRED ]

Example

ALTER USER sidney
IDENTIFIED BY second_2nd_pwd
DEFAULT TABLESPACE example;

ALTER USER sh
PROFILE new_profile;

ALTER USER sh
DEFAULT ROLE ALL EXCEPT dw_manager;

ALTER USER app_user1 IDENTIFIED GLOBALLY AS 'CN=tom,O=oracle,C=US';

ALTER USER sidney PASSWORD EXPIRE;

ALTER USER sh
TEMPORARY TABLESPACE tbs_grp_01;

ALTER USER app_user1
GRANT CONNECT THROUGH sh
WITH ROLE warehouse_user;

ALTER USER app_user1 REVOKE CONNECT THROUGH sh;

ALTER USER sully GRANT CONNECT THROUGH OAS1 AUTHENTICATED USING PASSWORD;

ALTER USER app_user1 GRANT CONNECT THROUGH ENTERPRISE USERS;

bottom of page