查询用户状态
select username,account_status from dba_users;
select username,account_status,lock_date from dba_users;
select username,account_status,lock_date from dba_users order by 1;
select username,account_status,lock_date from dba_users where username = 'BAOYW';
select username,account_status,lock_date from dba_users where account_status <> 'OPEN' order by 1;
解除用户锁定
alter user username account unlock;
查看用户限制
set linesize 200
col profile for a20;
col limit for a30;
select profile,resource_name,resource_type,limit from dba_profiles where profile = 'DEFAULT';
PROFILE RESOURCE_NAME RESOURCE LIMIT
-------------------- -------------------------------- -------- ------------------------------
DEFAULT COMPOSITE_LIMIT KERNEL UNLIMITED
DEFAULT SESSIONS_PER_USER KERNEL UNLIMITED
DEFAULT CPU_PER_SESSION KERNEL UNLIMITED
DEFAULT CPU_PER_CALL KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
DEFAULT LOGICAL_READS_PER_CALL KERNEL UNLIMITED
DEFAULT IDLE_TIME KERNEL UNLIMITED
DEFAULT CONNECT_TIME KERNEL UNLIMITED
DEFAULT PRIVATE_SGA KERNEL UNLIMITED
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 10
DEFAULT PASSWORD_LIFE_TIME PASSWORD 180
PROFILE RESOURCE_NAME RESOURCE LIMIT
-------------------- -------------------------------- -------- ------------------------------
DEFAULT PASSWORD_REUSE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD NULL
DEFAULT PASSWORD_LOCK_TIME PASSWORD 1
DEFAULT PASSWORD_GRACE_TIME PASSWORD 7
DEFAULT INACTIVE_ACCOUNT_TIME PASSWORD UNLIMITED
17 rows selected.