col username for a25
col account_status for a8
col default_tablespace for a10
select username , account_status , created , default_tablespace from dba_users where account_status not like 'EXPIRED%';
#鎖定帳號
SQL> alter
user TEST account lock;
#使密碼失效
, 若下次解鎖登入後
, 會要求更改新密碼
SQL> alter
user TEST password expire;
#解開帳號
SQL> alter
user TEST account unlock;
#List All User Roles with dba 權限
select granted_role , grantee from DBA_ROLE_PRIVS where grantee in (select username from dba_users) and granted_role in ('DBA','SYSDBA') order by GRANTEE;
#List All User Roles with dba 權限
select granted_role , grantee from DBA_ROLE_PRIVS where grantee in (select username from dba_users) and granted_role in ('DBA','SYSDBA') order by GRANTEE;
沒有留言:
張貼留言