wiley-logo-sm.gif
> wiley.com

HIGH PERFORMANCE ORACLE: Proven Methods for Achieving Optimum Performance and Availability

This page contains the source code examples in the book. Most of them are Perl scripts. Feel free to download them, change them and redistribute them. You can use any existing Perl 5.6 interpreter on your server to run all scripts not marked (Oraperl).The top line of the script identifies the location of the Perl interpreter e.g.:

#!/usr/local/bin/perl

If yours is in a different location, just change the top line. You can check the version of your interpreter as follows:


$ /usr/local/bin/perl -v  # Solaris
This is perl, v5.6.0 built for sun4-solaris


$ /usr/bin/perl -v  # Linux

This is perl, v5.6.0 built for i386-linux


Those scripts marked (Oraperl) require a Perl interpreter linked with Oracle. Chapter 4 explains how to create one. The top line contains the location of the Perl interpreter:

#!/u01/app/oracle/oraperl/bin/perl

If yours is in a different place, change this line. One feature common to all the Perl scripts is that you can run them with a single argument help=y to display the available options.

Some scripts require functionality in the scripts dbcool_lock.pl and dbcool_util.pl. These scripts can be found in dbcool_perl.tar. You need to make sure that the -I path on the top line of the script matches the directory where you installed them:

#!/usr/local/bin/perl -w -I/u01/app/oracle/perl

A suitable place for all the Perl scripts is $ORACLE_BASE/perl. Consider adding $ORACLE_BASE/perl to your $PATH so you can run the scripts without a full path name.

Chapter 4 Environment Standards and Tools

dbcool_perl.tar: contains all the scripts described in the text. To install the scripts, copy dbcool_perl.tar to /tmp on your UNIX server then:

$ cd $ORACLE_BASE
$ tar xvf /tmp/dbcool_perl.tar

Chapter 5 Security Considerations

dbcool_audit.pl (Oraperl): performs a basic Oracle database security audit.

Chapter 13 Managing Space Growth

dbcool_space.zip contains the following scripts:

  1. dbcool_space_tables.sql: run this first to install the tables that hold collected space info
  2. dbcool_space.sql: run this next to create the DBCOOL_SPACE package, which collects space growth info into the tables
  3. dbcool_space.xls: run this Excel spreadsheet to create JPEG charts of space growth from collected info
  4. dbcool_space_changes.sql: run this in SQL*Plus or DbCool to shows objects that have changed size since the last collection

Chapter 18 Backup and Recovery using RMAN

dbcool_rman_gen.pl: generates RMAN backup script

dbcool_legato_gen.pl: generates Legato backup scripts for RMAN

Chapter 23 Protecting Data Using Standby Databases

dbcool_gen_standby.pl (Oraperl): creates scripts to help create physical and logical standby databases

dbcool_arch_to_standby.pl (Oraperl):transfer archived redo logs to a standby site

Chapter 24 Guidelines for Healthchecks and Monitoring

dbcool_ora_healthcheck.pl (Oraperl): performs an Oracle database healthcheck.

The checks in this script might not match your organization's standards. If so, just change them or add more. What's more important is that you have standards and that you enforce them. This script can help you do that.





Cover

ISBN 0-471-22436-7
720 Pages
September, 2002

Wiley Computer Publishing
Timely. Practical. Reliable.

[ Home ]

[ Source Code ]

[ Other Papers ]