Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ Oracle SQL statement tracking     - Understanding the Linux load average on other UNIX-Like systems (Linux)

- Three strategies to teach you to release the device memory (Linux)

- Linux Firewall Builder shorewall (Linux)

- Linux system installation and usage instructions Wetty (Linux)

- Through the source code to install MySQL 5.6.26 under CentOS6 (Database)

- How to compile and install wxWidgets in Ubuntu / Debian / Linux Mint (Linux)

- Ubuntu 14.04 build Gitlab (Linux)

- To install and configure the Jetty server and JDK under Ubuntu 14.04.2 (Server)

- Infinispan 8 new Redis cache storage implementation (Linux)

- shell script: the number of characters in the text to print no more than 6 words (Programming)

- Oracle 11g on Linux system boot from the startup settings (Database)

- Oracle how to maintain the consistency of read? (Database)

- Ubuntu system cp: omitting directory problem (Linux)

- 20 Top Linux commands (Linux)

- SecureCRT use the configuration detailed tutorial (Linux)

- Ubuntu install Tonido private cloud services (Server)

- Linux system monitoring, top command of the diagnostic tool Detailed (Linux)

- Debian (Wheezy) were installed wxPython GUI development (Linux)

- Basic Operation Linux files and directories (Linux)

- [JavaScript] catch (ex) statements of ex (Programming)

  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.
- using Docker Kitematic on windows (Linux)
- Why you should choose Python Programming (Programming)
- Linux Security and Optimization (Linux)
- Use the TC flow control test under Linux (Linux)
- Experience CoreCLR stack unwinding characteristics of initial implementation on Linux / Mac (Linux)
- Nine tips to protect the security of Linux desktop (Linux)
- Java integrated development environment common set of operations (Linux)
- Linux server security - the web server configuration (Linux)
- Understand the security restore accidentally deleted critical system files (Linux)
- Linux-based Heartbeat high availability configuration httpd service (Server)
- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)
- Effect MongoDB plan cache (Database)
- Broadcom transplanted to OpenWrt summary (Programming)
- The lambda expression Java8 (constructor references) (Programming)
- Security measures under Unix multi-user operating system (Linux)
- DRBD-based installation and configuration of CentOS 6.5 (Server)
- Linux (CentOS) SSH login without password authentication (Linux)
- Security matters and practical Linux System (Linux)
- HBase vs Oracle (Database)
- Bootable ISO image using GRUB (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.