Month: May 2011

Python row copier

Below is a script I wrote to copy a set of tables from one schema (or database) to another. It simply takes every table in the source schema and builds up an array based copy for it, with the usage…

Running procedures?

You can use what is below to print out each session that is currently executing (or has pinned) a given stored procedure column owner format a20 column name format a30 column type format a15 set lines 255 trims on SELECT…

How much can I shrink my datafile?

Periodically, we will need to shrink a datafile. In Oracle, you can only shrink a file to the point occupied by the “highest” block in the file. The SQL below will provide you with the SQL to execute for each…