用户解锁:
ALTER USER username ACCOUNT UNLOCK;
查询数据库状态:
select status from v$instance;
需要实例启动,且是started状态;
select open_mode from v$database;
需要数据库是open,不能查询出是否是mount还是open.
查看用户系统权限:
select * from dba_sys_privs;
select * from session_privs;
select * from user_sys_privs;
查看用户对象权限:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;