session || ogr where pan ddr spa 修改 art
oracle 查询数据库最大连接数等信息
- 1.当前的数据库连接数
- select count(*) from v$process where program='ORACLE.EXE(SHAD)';
- 2.数据库允许的最大连接数
- select value from v$parameter where name ='processes'
- 3.修改最大连接数,需要重启数据库才能生效:
- alter system set processes = 300 scope = spfile;
- 4.重启数据库
- shutdown immediate;
- startup;
- 5.查看当前有哪些用户正在使用数据
- SELECT osuser, a.username,cpu_time/executions/1000000||'s',b.sql_text,machine
- from v$session a, v$sqlarea b
- where a.sql_address =b.address order by cpu_time/executionsdesc;
- 6.当前的session连接数
- select count(*) from v$session
- 7.并发连接数
- select count(*) from v$session where status='ACTIVE'
- 8.最大连接
- show parameter processes
来源: http://www.bubuko.com/infodetail-2450281.html