Programming

Running RMAN commands from PLSQL

Tuesday, October 27, 2009
By Steve

I still haven’t been able to determine if this is 100% supported, but it works. If you wanted to delete archived redo logs from within a database session (for some unknown reason), you can run something similar to the following: begin for cur in (select * from v$archived_log where deleted = 'NO' and... »

Manually subscribing to Oracle FAN events

Wednesday, September 9, 2009
By Steve

JDBC and dot Net clients are the recommended way to automatically subscribe to high availability events in an Oracle clustered environment, AKA, a RAC. I was curious as to how this could be implemented using your own code behind the scenes. To show this, we will use a combination of PL/SQL and python. First, we... »

Python based stress tester

Wednesday, July 22, 2009
By Steve

I often find myself building something in anticipation of needing it at some point.  This is one of those cases :)  Below is a template (a real working one for my needs) that you can edit to build a simple load testing tool.  We were having a performance problem with one SQL statement, and... »

Compressing and Decompressing XMLTYPE’s

Wednesday, July 8, 2009
By Steve

We are testing with compression of our XMLTYPE data. We are initially testing with the following… create or replace package compression_utils is function comp_data(p_data in xmltype) return blob; function decomp_data(p_data in blob) return xmltype; end; / create or replace package body compression_utils is function comp_data (p_data in xmltype) return blob is ... »

How many rows does PL/SQL array fetch by default?

Friday, May 22, 2009
By Steve

I was curious as to how many rows PL/SQL will fetch by default without a BULK COLLECT clause. For those of you that may not know, fetching multiple rows at a time can substantially reduce the run times of programs that deal with a large number of rows. We set up the obligatory test... »

Switch to our mobile site