perl
New Project: trc2sql.pl - Extract SQL from an Oracle Trace...
dmann — Fri, 10/14/2011 - 16:18
I started a new project for a utility I started writing. It has some basic functionality now but will probably increase in utility int he future.
It is a Perl script that extracts the SQL statements from an Oracle 10046 trace file. This is useful if you need to re-run SQL that was captured during a trace. It also helps reduce the amount of junk you have to slog through if you are interested in
trc2sql.pl - Extract SQL Statements From Oracle 10046 Trace File
-Dave
trc2sql.pl - Extract SQL Statements From Oracle 10046 Trace File
dmann — Fri, 10/14/2011 - 16:00
Purpose:
This Perl script will extract the SQL Statements out of an Oracle 10046 Trace File.Usage:
trc2sql.pl < input.trc > output.sql
Source Code
trc2sql.pl :
#!/usr/bin/perl
# 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
Read more » Long Operations Real Time Viewer - Perl
dmann — Sat, 03/27/2010 - 23:50
Purpose
Monitor Long Operations inside an Oracle Database using Perl/DBI. This can be useful for monitoring Table Scans, Index Rebuilds, and Exports.Source Code
http://ba6.us/CodeExamples/Perl-LongOpsDBI and mod_perl for Oracle 10g HTTP Server
dmann — Fri, 04/25/2008 - 22:36
Installing Perl/DBI/DBD on Win32 just got a little simpler...
dmann — Mon, 01/14/2008 - 12:53
Perl has been Eclipsed...
dmann — Wed, 10/03/2007 - 22:49
I've been using TextPad for writing Perl programs forever. TextPad is a pretty lightweight editor with a lot of decent features. Its nice because you can set up a PL document class with a syntax file to enable highlighting whenever you edit a *.pl file.
But today I'm working on a more complicated script with multiple functions. My main requirement is that there be an outline view so I can quickly jump between functions. Read more »
Getting return value and output text with Perl...
dmann — Wed, 09/05/2007 - 14:51
#!/bin/perl
# Execute dir command
$command = `dir`;
# Show the output of the command
#split by newlines, put into @alloutput array
@alloutput = split /\n/, $command;
#loop once for each item in @alloutput array
foreach $outputline (@alloutput) {
Read more » Tim Bunce on the future of Perl DBI
dmann — Tue, 01/16/2007 - 13:54
PerlCast.COM has posted a interview with Tim Bunce available here.
Audio is here: http://www.perlcast.com/audio/Perlcast_Interview_038.mp3
– Dave
Like the v$session_longops progress bar in OEM? You'll love this…
dmann — Wed, 12/13/2006 - 16:31
One of the redeeming qualities of the Java Oracle Enterprise Manager client is the progress bar that comes up when you are viewing the long operations of a session. I wanted this functionality but didn’t want to wake up the big lug to get this info (it takes a long time to start up the OEM client and navigate to the screen to see the long operations progress bar).
So I decided to write a short script to emulate that functionality but take it one step further and show me info about _all_ the longops currently running on an instance. Read more »
otop , a 'top' utility for Oracle
dmann — Wed, 12/13/2006 - 12:00
I recently discovered that someone else is publishing some Perl utilities to monitor Oracle!
I've been using Perl to get things done with Oracle for a while and have found it extremely helpful. The current environment that I work in has a mixture of OSes so sometimes its easier to install Perl and DBI everywhere and write a simple Perl Script than to try to do something in DOS Batch for one client and then do it again in a bash shell script for another.
Sean Hull published a video of his talk about otop, the PowerPoint slides, and the downloadable source on his company's site: Read more »
