Oracle knowledge-tracking SQL statements 1. First, find the session information SID of a machine you want to track, SERIAL # select SID, SERIAL # from v $ session where lower (terminal) like '% yf07 %'; www.2cto.com 2. Enable tracking: exec dbms_monitor.session_trace_enable (SID, SERIAL #, TRUE, FALSE); 3. Locate the tracking file location: the value of the show parameter user user_dump_dest parameter is the location where the trace file is stored. 4. obtain and analyze the tracking file. 5. Disable tracking: www.2cto.com exec dbms_monitor.session_trace_disable (SID, SERIAL #); there is another method. However, this method may cause all statements executed to be recorded. First, run alter system set SQL _trace = true using sys, and then run the program. In this way, the statement is recorded in the database trace folder, that is, the value of user_dump_dest.