Dave (130)

Dave

Changing spreport to run StatsPacks from the command line...

Statspack Reports can be useful for diagnosing performance problems, but they are only useful if they are generated and available! I wanted to set up an operating system job to generate statspacks. First I wrote a cron job to execute statspack.snap() at intervals during our…

Dave

Questioning Traditional Data Management

I found an interesting article by Scott W. Ambler on Doctor Dobbs Journal today called "Questioning Traditional Data Management". http://www.drdobbs.com/architecture-and-design/questioning-traditional-data-management/199700857 Scott points out 6 assumptions data management professionals often make and points out why he believes they are not valid assumptions. Assumptions like: It's expensive…

Dave

Returning Error Codes from SQLPLUS

There may come a time when you need to return an error code from SQLPlus, either to a calling batch file, shell script, or Perl script. SQLPlus has a WHENEVER directive available for handling errors it encounters. This command controls the behavior of SQLPlus when…

Dave

Automagically Graphing on Linux

So my last post was about administration on Linux. After running Oracle on Windows for way too many years we migrated our Oracle systems to 64-bit Linux over the past year. Now that we're on Linux I needed a lightweight way to capture and graph…

Dave

Agile Development for Database Schemas

I've recently been working on improving the Database Change procedures and Deployment procedures where I work. We like to turn around releases every 2-4 weeks or so but sometimes the friction of keeping a sane and organized development process slows us down. At this point…

Dave

Make your own Long Running Operation

Did you know you can make your own Long Running Operation that is available to the V$SESSION_LONGOPS system view? At the bottom of the Oracle documentation for DBMS_APPLICATION_INFO is some example code: http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_appinf.htm#i999254 In a previous post I posted Perl source code for a script…

Dave

SQLPLUS and the Ant build tool...

I've been looking for ways to automate running of Oracle SQLPlus PL/SQL scripts.Of course there are always batch and shell scripts but I'm looking for something less OS specific.Our Java build process is controlled by Apache Ant. It would be nice to include running of…

Dave

Software blast from the past…

Ever smell something that brings back a memory from way long ago? I had the same sort of experience today but it was because I saw a software display screen. I was in a popular discount store in the Southeast US today and the cashier…

Dave

Oracle imp utility COMMIT parameter and LOBS…

If you have a lot of LOB data to move around with Oracle import/export utilities this might help you out. The default for the COMMIT parameter is No. COMMIT=N : For tables that have a LOB column, commit is performed after loading each table This…

Dave

Using SQLPLUS to generate scripts…

Tired of updating scripts by searching and replacing until your fingers fall off? Have a SQL statement you have to run against every table in your schema? Next to Regular Expressions, this is one of the most useful tools in my arsenal. Common uses for…