星期四, 5月 29, 2014

Oracle Session

via SQL-Plus
 - sessions >= 1.1 * processes + 5
SQL> show paramtere processes;
SQL> alter system set processes=1000 scope=spfile;
SQL> show parameter processes;
SQL> create pfile from spfile;
SQL> shutdown immediate;
SQL> startup

via SQL-IDE

查詢參數
select value from v$parameter where name = 'processes';
select value from v$parameter where name = 'sessions';

現況連線
select * from v$session where username is not null;
select username, count(username) from v$session where username is not null group by username;
select machine, count(machine) from v$session where machine is not null group by machine;
select count(*) from v$process;
select count(*) from v$session;
select count(*) from v$session where status = 'ACTIVE';
select sid, serial#, username, program, machine, status from v$session;

LOCK Session
select * from DBA_DML_LOCKS;
select a.sid || ',' || a.serial#, a.machine from v$session a, DBA_DML_LOCKS b
where a.sid  = b.session_id group by a.sid || ',' || a.serial#, a.machine
alter system kill session 'xxx,yyyy' immediate;



沒有留言: