oracle 查询数据库连接数目

前端之家收集整理的这篇文章主要介绍了oracle 查询数据库连接数目前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
select * from v$session where username='XXXX' and status='ACTIVE' and osuser='XXX'

当我启动连接池的时候,可以看见会话数目增加了,这应该可以说明每个线程都启动了一个connection。

1、查询oracle的连接数
2selectcount(*)fromv$session;
3查询oracle的并发连接数
4selectcount(*)fromv$sessionwherestatus='ACTIVE';
53、查看不同用户的连接数
6selectusername,count(username)fromv$sessionwhereusernameisnotnullgroupbyusername;
74、查看所有用户
8select*fromall_users;
95、查看用户或角色系统权限(直接赋值给用户或角色的系统权限):
10select*fromdba_sys_privs;
11select*fromuser_sys_privs;
126、查看角色(只能查看登陆用户拥有的角色)所包含的权限
13select*fromrole_sys_privs;
147、查看用户对象权限:
15select*fromdba_tab_privs;
16select*fromall_tab_privs;
17select*fromuser_tab_privs;
188、查看所有角色:
19select*fromdba_roles;
209、查看用户或角色所拥有的角色:
21select*fromdba_role_privs;
22select*fromuser_role_privs;
2310、查看哪些用户有sysdba或sysoper系统权限(查询时需要相应权限)
24select*fromV$PWFILE_USERS;

select count(*) from v$process --当前的连接数

参考博文:

http://blog.itpub.net/24558279/viewspace-752293/

原文链接:https://www.f2er.com/oracle/212033.html

猜你在找的Oracle相关文章