16 03 2020
1.DB Conneciton Pool 관련 Pool조회 select * from v$resource_limit where resource_name in (‘processes’, ‘sessions’); Sessions 접속 정보 쿼리 SELECT username, program FROM v$session; 접속 사용자 제거
1 2 |
--alter system kill session 'session_id,serial#'; alter system kill session '32,11234'; |
현재 Connection Pool 사용현황
1 2 3 |
SELECT * FROM V$resource_limit WHERE resource_name IN ('processes','sessions'); |
접속이 안되는 경우 INACTIVE 갯수가 많을 경우 삭제 하면 됨
1 2 3 4 |
SELECT 'alter system kill session ''' || sid || ',' || serial# || ''' immediate;' FROM v$session WHERE username = 'NURIWARE' AND status = 'INACTIVE' |
나오는 결과를 아래처럼 실행
1 2 3 4 5 6 7 8 9 10 |
alter system kill session '13,46763'; alter system kill session '29,30175'; alter system kill session '39,21235'; alter system kill session '43,53103'; alter system kill session '45,40359'; alter system kill session '46,50781'; alter system kill session '62,65397'; alter system kill session '71,15497'; alter system kill session '256,13051'; alter system kill session '262,14689'; |
2.DB Lock 관련 lock 조회
1 2 3 4 5 6 7 |
SELECT DO.OBJECT_NAME, DO.OWNER, DO.OBJECT_TYPE, DO.OWNER, VO.XIDUSN, VO.SESSION_ID, VO.LOCKED_MODE FROM V$LOCKED_OBJECT VO, DBA_OBJECTS DO WHERE VO.OBJECT_ID = DO.OBJECT_ID; |
[…]