Sie sind auf Seite 1von 2

Alter System Set sec_case_sensitive_logon = False Scope=Both;

Alter System Set Open_Cursors= 800 Scope=Spfile;


Alter System Set Processes= 800 Scope=Spfile;
Alter System Set Transactions= 970 Scope=Spfile;
Alter System Set SGA_Max_Size= 584M Scope=Spfile;
Alter System Set SGA_Target= 584M Scope=Spfile;
Alter Profile Default Limit Password_Life_Time Unlimited;
Alter System set deferred_segment_creation = False Scope=Both;

select DISTINCT OSUSER, username, program, status


,trunc(last_call_et/60) idle_Min, trunc(last_call_et/(60*60)) idle_Hrs
from v$session
WHERE USERNAME IS NOT NULL;

select DISTINCT sid,serial#, OSUSER, machine, terminal, username, program, status


,to_char(logon_time,'DD-MON-RR hh24:mi') logon_time
,trunc(last_call_et/60) idle_Min, trunc(last_call_et/(60*60)) idle_Hrs
from v$session
WHERE USERNAME IS NOT NULL;

select DISTINCT sid,serial#,OSUSER, machine, terminal, username, program,


status,EVENT, WAIT_CLASS,WAIT_TIME,STATE
,to_char(logon_time,'DD-MON-RR hh24:mi') logon_time
,trunc(last_call_et/60) idle_Min, trunc(last_call_et/(60*60)) idle_Hrs
from v$session
WHERE USERNAME IS NOT NULL ;

select DISTINCT OSUSER, machine, terminal, username, program, status


,to_char(logon_time,'DD-MON-RR hh24:mi') logon_time
,to_char((sysdate-(last_call_et/86400)),'DD-MON-RR hh24:mi')Last_call_Time
,trunc(last_call_et/60) idle_Min, trunc(last_call_et/(60*60)) idle_Hrs
from v$session
WHERE USERNAME IS NOT NULL AND status <> 'KILLED' AND USERNAME <> 'SYSTEM'
group by OSUSER, machine, terminal, username, program,
status,logon_time,last_call_et
ORDER BY LAST_CALL_TIME DESC;

-- check max open cursor

SELECT max(a.value) as highest_open_cur, p.value as max_open_cur FROM v$sesstat a,


v$statname b, v$parameter p WHERE a.statistic# = b.statistic# and b.name =
'opened cursors current' and p.name= 'open_cursors' group by p.value;

select count(*),SID, USER_NAME,address from v$open_cursor


where user_name <>'SYS'
group by address,SID, USER_NAME
select SID,USER_NAME,ADDRESS,SQL_TEXT,CURSOR_TYPE from v$open_cursor
where user_name NOT IN ('SYS' ,'SYSTEM')
AND CURSOR_TYPE='OPEN'

SELECT SQL_TEXT FROM V$SQL WHERE ADDRESS='28C7735C';


select SID,USER_NAME,ADDRESS,SQL_TEXT,CURSOR_TYPE from v$open_cursor
where user_name NOT IN ('SYS' ,'SYSTEM')
AND CURSOR_TYPE='OPEN'

SELECT SQL_TEXT FROM V$SQL WHERE ADDRESS='28C7735C';

ALTER SYSTEM KILL SESSION '36,11370'

check resource utilization:


-------------------------------
select resource_name, current_utilization, max_utilization, limit_value
from v$resource_limit
where resource_name in ( 'sessions', 'processes')