Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle SQL statement tracking     - Oracle 12c In-Memory Study (Database)

- VMware6 achieve nat Internet (Linux)

- Protect your files, modify the Linux value Umask (Linux)

- Upgrading KDE Plasma 5.3 in Ubuntu 15.04 (Linux)

- PostgreSQL query lock and kill the process (Database)

- Oracle to use full-text indexing (Database)

- To access an Oracle database using Instant Client (Database)

- Install RAID 6 (Striping double distributed parity) (Linux)

- How do I switch from NetworkManager to systemd-network on Linux (Linux)

- RHEL7 system making use of OpenStack mirror (Linux)

- Using FTPClient to upload and download files in Java (Programming)

- Swift acquaintance of values and references, the circular reference, Agent Precautions (Programming)

- Java memory-mapped file MappedByteBuffer (Programming)

- Teach you how to choose to install CentOS 6.5 installation package (Linux)

- CentOS yum source as the default setting methods in DVD (Linux)

- Processor in protected mode of protection (Linux)

- Build RubyMine + Ruby On Rails + MySQL development environment under Windows (Server)

- How to import JNI resulting .so libraries in Android Studio (Programming)

- Writing Better Bash build script 8 (Programming)

- Android Sets the system screen brightness (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.
     
         
       
         
  More:      
 
- Prevent security threats caused Rootkit (Linux)
- Reason C ++ program running under Linux a segmentation fault core dumped in (Programming)
- Linux remote wake the computer original code [C] (Linux)
- MySQL Server Time Synchronization Problem (Database)
- How to use Monit to deploy a server to monitor the system (Server)
- Linux prohibit non-WHEEL user su command Detail (Linux)
- PL / SQL data types (Database)
- How to use the Linux command compress JPEG images (Linux)
- Using Libreoffice under ubuntu (Linux)
- MySQL5.6.17 compiler installation under CentOS (Database)
- Oracle 10g New Features - Archive Compression (Database)
- Let Markdown code syntax highlighting and support Django1.6 (Linux)
- Based Corosync + Pacemaker + DRBD + LNMP Web server to achieve high availability cluster (Server)
- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Mac (Linux)
- grep, egrep and regular expressions (Linux)
- Linux System Tutorial: Ubuntu on the desktop is disabled by default keyring to unlock tips (Linux)
- C # socket udp broadcast (Programming)
- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)
- How to create a bootable USB disk to use MultiSystem on Ubuntu (Linux)
- Heartbeat cluster components Overview (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.