Author: Steve

Dumping Oracle DDL part two

Below is a python script that strip the double quotes from the output of dbms_metadata.get_ddl, as well as the storage clauses. The initial clause is often far too high, so this allows you to extract the DDL and run it…

History of computers

I found this interesting link while searching for something else. It is a fairly complete history of computer technology from the time before Christ to 2003. Enjoy.

Running log miner from python

Python is so flexible for quick and dirty toolsets, that I built one this morning that invokes the Oracle log miner software to read archived redo logs. It queries the logs for changes to a given table, and prints any…

Quick way to compare two python lists

***Please read the entire post if you are looking for a fast way to compare two lists*** If you need to compare two lists, you can use a list comprehension such as the following: >>> a=[1,3,5] >>> b=[1,2,3,4,5,6] >>> print…

Careful with that append hint!!

Today a DBA issued an insert statement with an append hint. This resulted in a fairly time consuming insert of many rows. The DBA was puzzled when all other sessions were blocked from inserting into the table. This is actually…

awk silliness

This one-liner will print every other character in upper case. oracle@emgrid01 ~ >echo “the quick brown fox jumped over the lazy dog” | awk -F “” ‘{for (i=1; i

instr() in awk

If you have a long command line string, as you may find with java processes with a lot of properties, what is below will allow you to print those “columns” with a certain value as delimited by a space in…