1 查看数据库当前进程的连接数:SELECT COUNT(*) FROM V$SESSION;
2查看当前数据库当前会话的链接数:SELECT COUNT(*) FROM V$SESSION;
3查看数据库的并发连接数:SELECT COUNT(*) FROM V$SESSION WHERE STATUS='ACTIVE';
4查看当前数据库建立的会话情况:SELECT SID,SERIAL#,USERNAME,PROGRAM,MACHINE,STATUS FROM V$SESSION;
5最大连接数:SELECT VALUE FROM V$PARAMETER WHERE NAME='PROCESSES';OR SHOW PARAMETER PROCESSES;
6修改:ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE;重启库
7SESSION 与PROCESS关系SESSION=(1.1*PROCESSES+5)
8PGA设置:PGA_AGGREGATE_TARGET=PROCESSES*4M;OLTP中可设SGA=PGA
9查看当前有哪些用户正在使用数据SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine
fromv$session a, v$sqlarea b
where a.sql_address =b.address order by cpu_time/executions desc;
数据库模式:SHOW PARAMETER SHARED_SERVER;大于0为共享