2013. 7. 31. 10:23

[Oracle] session 수 체크 및 session 죽이기

-- oracle session 수 체크

 

select count(*)
from  v$session a,
      v$process b
where a.paddr=b.addr;

 

select count(*)
from  v$session a,
      v$process b
where a.paddr=b.addr
  and a.schemaname = 'SEC';
  
 

 

-- USER ACCOUNT LOCK 해제

 

alter user nosun account unlock;

 

 

 

-- 락 죽이기

 

select a.sid, a.serial#
  from v$session a, v$lock b, dba_objects c
 where a.sid = b.sid
  and b.id1 = c.object_id
  and b.type = 'TM'
  and c.object_name = 'INVLOG';

  
alter system kill session '1050, 4549';

 

 

 

-- LOAD 걸린 SQL 보기

1. oracle/chun1001 접속
2. sqlplus "/as sysdba"
3. @?/rdbms/admin/awrrpt
3. 옵션 일수 선택 - > 스냅샷 시작 id 입력 -> 스냅샷 종료 id 입력
4. html ftp 로 다운로드

 

 

'Database / Sql' 카테고리의 다른 글

[Oracle] 대소문자 처리  (0) 2013.09.26
[Oracle] TOAD 스크립트 조회 및 백업  (0) 2013.09.26
[Oracle] 11g 삭제 방법  (0) 2013.07.15
[Oracle] Nested Loops, Sort Merge, Hash  (0) 2013.03.25
[Oracle] PK 수정  (0) 2013.03.25