1.查看所有用户:select * from dba_users; select * from all_users; select * from user_users;2.查看用户或角色系统权限(直接赋值给用户或角色的系统权限):select * from dba_sys_privs; select * from user_sys_privs; (查看当前用户所拥有的权限)3.查看角色(只能查看登陆用户拥有的角色)所包含的权限sql>select * from role_sys_privs;4.…
查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs; SQL>select * from user_tab_privs; 查看用户下所有的表 SQL>select * from user_tables;…
查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs; SQL>select * from user_tab_privs; 查看用户下所有的表 SQL>select * from user_tables;…
1. 查看活动会话信息[sql] view plain copySELECT * FROM V$SESSION WHERE USERNAME IS NOT NULL AND STATUS = 'ACTIVE' ORDER BY LOGON_TIME, SID; 注:status用来判断会话状态 Active:正执行sql语句(waiting for/using a resource) Inactive:等待操作(即等待需要执行的sql语句) …
查看当前用户所在表空间 select username,default_tablespace from user_users; 修改用户默认表空间 alter user 用户名 default tablespace 新表空间; 查看用户所拥有的角色 select * from user_role_privs; 查询数据库中有多少张表 select * from user_tables;…
select * from dba_sys_privs where GRANTEE='monkey'; select * from dba_role_privs where GRANTEE='monkey'; select * from DBA_TAB_PRIVS where GRANTEE='monkey';…
01.查看当前open用户 select username,account_status,expiry_date,profile from dba_users; 02.查看目前的密码过期策略 select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; 03.修改密码过期策略 alter profile default limit password_life_time…
--视图(可查看拥有者.对象名称.创建时间.上次修改时间) SELECT t.OBJECT_NAME, t.CREATED, t.LAST_DDL_TIME FROM user_objects t order by t.LAST_DDL_TIME desc; SELECT t.OWNER, t.OBJECT_NAME, t.CREATED, t.LAST_DDL_TIME FROM all_objects t; SELECT t.OWNER, t.OBJECT_NAME, t.CREATED,…
who命令与w命令相似,但要比w命令显示更加详细的信息.[root@rusky opt]# man who WHO(1) User Commands WHO(1) NAME who - show who is logged on SYNOPSIS who [OPTION]... [ FILE | ARG1 ARG2 ] DESCRIPTION Print information about users who are currently logged in. -a, --all same as…
NAME w - Show who is logged on and what they are doing. SYNOPSIS w - [husfV] [user] DESCRIPTION w displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the syst…
select * from (select owner || '.' || tablespace_name name, sum(b) g from (select owner, t.segment_name, t.partition_name, , ) b, tablespace_name from dba_segments t) where owner not in ('SYS', 'OUTLN', 'SYSTEM', 'TSMSYS', 'DBSNMP', 'WMSYS') group by…
1.查看所有用户:select * from dba_users; select * from all_users; select * from user_users; 2.查看用户或角色系统权限(直接赋值给用户或角色的系统权限):select * from dba_sys_privs; select * from user_sys_privs; (查看当前用户所拥有的权限) 3.查看角色(只能查看登陆用户拥有的角色)所包含的权限sql>select * from role_sys_…
本文转自:http://www.cnblogs.com/QDuck/archive/2010/08/11/1797225.html 1.查看所有用户: select * from dba_users; select * from all_users; select * from user_users; 2.查看用户或角色系统权限(直接赋值给用户或角色的系统权限): select * from dba_sys_privs; select * from user_sys_priv…