Category: Oracle

Multiple threads using same physical connection

This just doesn’t sound good. Having multiple threads use the same physical connection sounds like an exercise in frustration. Although the OracleDataSource connection object is thread safe, there is really no need to create a smaller number of connections than…

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…

MySQL mysqlbinlog vs. Oracle logmnr

MySQL provides the mysqlbinlog utility to parse binary transaction logs for any number of purposes which may include replication, auditing, or troubleshooting. Oracle also provides this functionality through a PL/SQL package called dbms_logmnr, more commonly referred to as “Log Miner”.…

Accessing ASM via FTP

This is a documented feature, but I wanted to post my notes so I could reference them if needed. All you basically have to do to set this up is: install XML DB (package dbms_xdb). This is installed if you…