-- 1. 현재 Trace 대상 Session 조회 (SYSTEM)
SELECT SID, SERIAL#, USERNAME, SERVICE_NAME, MODULE, ACTION, CLIENT_IDENTIFIER
FROM V$SESSION
WHERE 1 = 1
AND USERNAME IS NOT NULL
;
SID SERIAL# USERNAME SERVICE_NAME MODULE ACTION CLIENT_IDENTIFIER
---------- ---------- ------------ ---------------- ----------------- ---------- ---------------------
9 23710 SYSTEM SYS$USERS SQL Developer
134 42707 SCOTT SYS$USERS SQL Developer
-- 2. V$SESSION.CLIENT_IDENTIFIER 식별자지정 (SCOTT)
EXEC DBMS_SESSION.SET_IDENTIFIER('ANZINDA');
-- 3. 현재 Trace 대상 Session 조회 (SYSTEM)
SELECT SID, SERIAL#, USERNAME, SERVICE_NAME, MODULE, ACTION, CLIENT_IDENTIFIER
FROM V$SESSION
WHERE 1 = 1
AND USERNAME IS NOT NULL
;
SID SERIAL# USERNAME SERVICE_NAME MODULE ACTION CLIENT_IDENTIFIER
---------- ---------- ------------ ---------------- ----------------- ---------- ---------------------
9 23710 SYSTEM SYS$USERS SQL Developer
134 42707 SCOTT SYS$USERS SQL Developer ANZINDA
-- 4. Trace 해제 -> V$SESSION.CLIENT_IDENTIFIER 지정된 식별자 자동제거 됨
BEGIN
DBMS_MONITOR.CLIENT_ID_TRACE_DISABLE (
CLIENT_ID => 'ANZINDA'
);
END;
[오라클 성능고도화] 다른 세션에 TRACE 실행 및 확인법 (client id) (181P)
|
2019.04.15 23:40:20
|
2019.04.15 23:41:42
|
372
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2022.10.16
2022.07.01
2022.04.22
2020.01.20
2019.04.11
2019.03.04