In Praise of “update_on”

I’ve been working on an interface between two systems.

The interface has to watch system A and send transactions to system B. Normally, in the Oracle universe, there would be 2 ways to do this:

  1. Use database triggers on System A’s tables to trigger transactions
  2. Keep a separate record of the state of System A’s tables and compare it to the actual state - looking for differences which trigger transactions

The drawback with the first method is the performance hit of the database triggers on System A, as well as the possibility they might introduce errors into its processing.

The drawback with the second method is that replicating parts of the watched system is, well, just plain yucky.

Fortunately, in the case of this particular interface, System A uses a column called UPDATE_ON in its major tables. This column is updated whenever there is a change in the row. This means the interface just has to look for rows where UPDATE_ON is greater than when it last looked. It’s a much lighter touch than the other methods.

I encourage Data Architects everywhere to include an UPDATE_ON on their major tables in their designs - even if it’s usefulness isn’t immediately apparent.

Published in: on October 2, 2009 at 4:18 pm Comments (0)

Installing Oracle on Ubuntu

http://www.pythian.com/blogs/654/installing-oracle-on-ubuntu-linux-710-gutsy-gibbon

Published in: on May 17, 2008 at 11:12 am Comments (0)

Alternatives to dbms_output

Because it caches output and dumps it at the end of execution, dbms_output isn’t ideal for judging how a piece of PL/SQL is executing. Alternatives are:

  • dbms_application_info
  • utl_file
Published in: on April 28, 2008 at 1:04 pm Comments (0)

Oracle Caching

From #oracle this morning:

06:55 the PGA was set to 8Gb
06:55 which I recommended to be brought down to 2Gb
06:55 thought it would be enough
06:55 easy to check
06:56 just query the view v$pga_target_advice

06:58 you have to manually size the individual custom caches
06:58 it’s subtracted from the total sga
06:59 you can monitor where it takes the memory in v$sga_resize_ops

Published in: on April 11, 2008 at 2:27 pm Comments (0)