Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Windows
- Java
- springboot
- nodejs
- gson
- nginx
- JavaScript
- gradle
- kubectl
- wildfly
- log4j2
- NCP
- tibero
- JPA
- Spring
- Git
- dbeaver
- docker
- VSCode
- jetbrains
- IntelliJ
- BPMN
- react
- useEffect
- LOG4J
- intellijIDEA
- mybatis
- MySQL
- database
- Kubernetes
Archives
- Today
- Total
두 손끝의 창조자
Tibero 현재 열려 있는 세션 조회, Query opened sessions. 본문
SELECT * FROM
(
SELECT sid || ',' ||serial# "Sid,Serial"
,username "Username"
,status "Status"
,ipaddr "IPaddr"
,to_char(logon_time,'yy/mm/dd hh24:mi:ss') "Logon_Time"
,prog_name "Program"
--,pga_used_mem/1024 "PGA(KB)"
,wlock_wait "Wlock_Wait"
--,NVL(sql_id, prev_sql_id) "SQL_ID"
,NVL(sql_id, prev_sql_id) || '/' || NVL2(sql_id, sql_child_number, prev_child_number) "SQL_ID"
--,client_pid "Client_Pid"
,pid "Wthr_Pid"
--,wthr_id "Wthr_Id"
FROM v$session
ORDER BY 1,5
)
UNION ALL
SELECT '[Run: ' || sum(decode(status, 'RUNNING', cnt, 0)) || ']'
, '[Tot: ' || sum(cnt) || ']'
,null ,null ,null ,null ,null,null,null
FROM (
select status
, count(*) cnt
from v$session
group by status
) t;
반응형
Comments