Skip to content

Tag Archives: oracle

An analysis of Oracle errors in the leaked 9/11 Pager Data

30-Nov-09

Yes, you read that correctly. Here’s how it started: I’m working on some text analysis in Python and was looking for some test data. Someone recommended I use the 9/11 Pager Data from Wikileaks. I downloaded the data, ran my program against it (which is the subject of another post) and all was well. Got [...]

Generating multiple Oracle TKPROF reports using Python

24-Nov-09

Recently, a customer told me that they felt a batch job was taking too long each night, I gave them a few commands to add to their nightly run. alter session set tracefile_identifier=’charging_batch’; exec dbms_monitor.session_trace_enable; These commands named the tracefile and enabled 10046 logging. Since I’m lazy(the good kind), I figured I’d use Python to [...]

Process the whole world, or just one item

05-Nov-09

One of my favorite PL/SQL techniques used in batch job development is to add an extra parameter, default it to NULL, so that I can test a single account at a time. example CREATE PROCEDURE bill_employers(in_employer_id DEFAULT NULL) IS BEGIN FOR employer in SELECT emp.employer_id , emp.account_number , emp.bill_amt FROM employer emp WHERE emp.employer_id = [...]

Manager: How big is my table? Me: What do you mean?

03-Nov-09

Recently, a data warehouse manager sent me a list of 49 tables; he wants the approximate size of each. For an end-user, this is no easy task. Sure, GUI interfaces such as Toad or OEM will give this information, but not all managers (or developers for that matter) know how to get this information. Furthermore, [...]