Track session's execution, analyze tracking log files, solve problems

xiaoxiao2021-03-06  71

Track session's execution, analyze tracking log files, solve problems

--1. Find the session to be tracked

[Oracle @ bj udump] $ PS - EFUID PID PPID C Stime Tty Time Cmdoracle 6279 1 0 16:31? 00:00:01 OraclenewadM (local = no). . . . . Oracle 6375 1 0 17:34? 00:00:00 Oraclenewadm (local = no) Oracle 6376 6189 0 17:34 PTS / 0 00:00:00 ps --ef because I just landed, so basically the last process It must be me.

[Oracle @ bj udump] $ SQLPLUS "/ as sysdba" SQL * Plus: release 10.1.0.3.0 - Production on Thu Nov 25 17:34:40 2004copyright (C) 1982, 2004, Oracle. All Rights reserved.connected to : Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - ProductionWith The Partitioning, OLAP AND DATA MINING OPTIONS - Perform query statements, query session basic information

SQL> Select Sid, Serial #, Username, Machine2 from V $ Session B3 Where B.Paddr = (Select Addr4 from V $ Process C5 Where C.SPID = '& PID'); Enter Value for PID: 6375OLD 5: WHERE C. Spid = '& pid') New 5: where c.spid = '6375')

SID Serial # Username Machine ------------------------------------------ 254 489 admApp after WORKGROUP / LANLIHUA-- determination session information, package tracking program execution SQL> exec dbms_system.set_sql_trace_in_session (254,489, true); PL / SQL procedure successfully completed performing other operations DML .... SQL> exec dbms_system.set_sql_trace_in_session (254,489,. False); PL / SQL Procedure SuccessFully Completed .-- End Tracking, viewing the log: [Oracle @ bj udump] $ ls -ltotal 22096. . . . -rw-r ----- 1 Oracle OinsTall 9636 Nov 25 17:35 Newadm_ora_6375.TRC just found that the final file name is the process number, just did not find it. [Oracle @ bj udump] $ cat newm_ora_6375.TRC - Analysis of the generated tracking file, determine the problem, this method is very good

转载请注明原文地址:https://www.9cbs.com/read-87834.html

New Post(0)