sql trace

trc2sql.pl - Extract SQL Statements From Oracle 10046 Trace File

This Perl script will extract the SQL Statements out of an Oracle 10046 Trace File.

trc2sql.pl < input.trc > output.sql

Source Code
trc2sql.pl :


# David Mann
# ba6.us
# Extract SQL from an Oracle SQL Trace File (10046)
# Usage:
# Data is read from STDIN
# trc2sql.pl < input.trc > output.sql
# Change log:
# 13-OCT-2011 : Release

$InSQL = 0;
while (<>) {
$MyLine = $_;
$LineNum = $LineNum + 1;

# If END OF STMT found, stop printing

Developer access to 10046 trace files...

Jeremy Schneider posted his code to check the udump directory for trace files and allow remote to access them. Great for developer access or if you are automating access with a tool. Released as GPL as well so you are free to modify the code (after getting familiar with the license that is).



Subscribe to sql trace