Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ Oracle SQL statement tracking     - Linux System Tutorial: Fix ImportError: No module named wxversion error (Linux)

- Linux crontab command format example (Linux)

- Java memory analysis tool uses detailed MAT (Programming)

- How to use Android Studio to play more package names APK (Programming)

- Installation of Ubuntu Make under Ubuntu 15.10 (Linux)

- Revised OpenJDK Java Memory Model (Programming)

- Oracle metadata Reconstruction experiments (Database)

- NFS-based services and service utilization Corosync DRBD high availability cluster configuration, respectively (Server)

- Oracle large table to clean truncate .. reuse storage (Database)

- How to find out a Unix system library files are 32-bit or 64-bit (Linux)

- pdf.js Tutorial (Linux)

- Linux Command Line Art (Linux)

- To use Java arrays implement the order form (Programming)

- Linux fast set ip bond (Linux)

- Get the Linux device PCI ID method (Linux)

- PostgreSQL query result area is removed and precision (Database)

- Java implementation heap sort (large root heap) (Programming)

- To update Python version under CentOS system (Linux)

- Json data with double backslashes to a single backslash Json data processing (Programming)

- echo command (Linux)

  Oracle SQL statement tracking
  Add Date : 2017-08-31      
  1 SQL statement tracking

Tracking the implementation of SQL statements need to be carried out in the Oracle server-side, Oracle server-side will detect and record the implementation of the process of access to all SQL statements. The following command is used in the command line mode, so we need to use the command line as an administrator login Oracle database. The following is a detailed procedure for using the tool.

First of all, to catch up with the SQL statement, we need to determine the process of tracking the client session ID, the following command enumerates all the current server session ID and serial access to all processes, and then select the need to detect the session ID and serial port.

Select username, sid, serial # from v $ session where username is not null;

And then for the selected session ID and serial port for SQL statement tracking, as shown in the following command.

EXECUTE sys.dbms_system.set_sql_trace_in_session (10, 2642, TRUE);

Start tracking SQL statement, we can operate on the client, and these operations using the SQL statement will be recorded, until we end the SQL statement to track.

After the final client operation is complete, use the following command to end the SQL statement tracking.

EXECUTE sys.dbms_system.set_sql_trace_in_session (10, 2642, FALSE);

After the chase in the end of the Oracle server will produce a folder under the latest. Trc suffix file, we can use Search Everything tool to find the most recent production. Trc file, and then use the tkprof tool to resolve the file.

2 TRC file resolution

To parse the generated .trc file, you need to use the tkprof tool, which has a lot of complex parameters available. If you do not do complex requirements, you can use the following simple command to output the .trc file as a text file.

Parsing commands are as follows:

Tkprof sqlplus_007.trc out.txt

Sqlplus_007.trc is the data trace file

Out.txt format for the output file

Open out.txt file, you can access the SQL statement execution.
- JavaScript, some conclusions about the implicit conversion (Programming)
- How do you access Dropbox Linux command line (Linux)
- extundelete: the Linux-based open source data recovery tools (Linux)
- Python decorators to learn and practice the actual usage scenarios (Programming)
- IntelliJ IDEA common list of shortcuts (Linux)
- JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment (Server)
- Linux --- manual release system cache (Linux)
- Slow update statement Performance Analysis (Database)
- Linux using DenyHosts prevents ssh cracks (Linux)
- Ubuntu Froxlor Server Administration panel installation (Server)
- sa weak passwords intrusion prevention (Linux)
- Java memory model subclasses (Programming)
- MySQL concat function is SQL injection (Linux)
- Oracle Standby Redo Log experiment (Database)
- To set up the printer use Nagios Monitoring Server (Server)
- The new features of MySQL 5.7 Generated Column (index function) (Database)
- Update GAMIT10.6 command (Linux)
- Let Linux boot methods to enter characters interface and set FrameBuffer resolution methods (Linux)
- Check with Hello World Docker installation (Server)
- Oracle 11G using DG Broker create DataGuard (Database)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.