Author: Steve

Child records where no parent exists?

This is a great interview question: How can there be child records where no parent exists? This is actually a trick question. There can exist child *records*, but no *values* for the column that references a non-existent parent. In other…

Weblogic stuck thread printer

This is a useful script for crawling the Weblogic domain logs and printing threads that have been stuck, as well as the duration they were stuck. It doesn’t include the initial ten minute (default) window before a log entry is…

JNLP Example

Java Web Start is the technology that allows a user to run java from their local device. The software that is run is loaded from a server via a directive in a JNLP file on the server. It is downloaded…

Oracle materialized view and query rewrite

Just a simple example to show what it takes to get this to work… SQL> set lines 1000 trims on pages 100 SQL> explain plan for select count(*) from member; Explained. SQL> select * from table(dbms_xplan.display()); PLAN_TABLE_OUTPUT ——————————————————————————– Plan hash…

What is the most likely dice roll?

Probably common sense, but this statistically supports the most common roll of the dice. Of course, this assumes physical normalcy of the die, not loaded, etc. 🙂 [root@cmhlcanlyodb01 ~]# cat rand.py import random d = dict() for i in range(1,100001):…

CRC check on gzip files in HDFS

I am sure there is a more elegant way to do this, but I wanted it done quickly. We had a few files that threw exceptions about the end of the file being reached (CRC failure) for external files underlying…