U of A University of Arkansas Division of Agriculture

Pictures of chickens, flowers, wheat, a boy looking through a magnifying glass, irrigation pipe, soybean pods, and fruits and vegetables.

Cooperative Extension Service

Cooperative Extension Service

Agricultural Experiment Station

Steve Rea's
Oracle Tips, Tricks, and Scripts

Link to Steve Rea's Oracle Certification graphic


Search | Publications | Jobs | Personnel Directory | Links

Fireworks Picture

Visits since 9/1/98:
50,000: 3/16/00
100,000: 11/14/00
150,000: 3/26/01
200,000: 7/1/01
250,000: 10/26/01
300,000: 4/12/02
350,000: 10/7/02
400,000: 5/12/03
450,000: 1/9/04

 
Oracle Tips, Tricks, and Scripts

Featuring:

Bulletproofing, Backups, and Disaster Recovery Scenarios
 
Implementing Data Guard
 
Cross Referencing Tables and Forms Used by a Form

 
(This Page was Last Updated on 03/26/08)

Fireworks Picture

Half a Million Visits!
9/1/98-7/30/04

Visits since 9/1/98:
500,000: 7/30/04
600,000: 1/4/06
700,000: 10/10/07


Welcome to my web collection of Oracle and Banner sticky notes (now, I can throw the paper ones away!).  Here (see contents) are some tips and tricks that I've learned while working with Oracle as a DBA with the Cooperative Extension Service, downloadable scripts that I and others have developed for maintaining Oracle databases and gleaning information about the SunGard SCT Banner data in those databases, and other Oracle, Banner, and UNIX information you might find useful.  Some of this is Banner specific, but even those can give you ideas for similar scripts to be used with other 3rd party Oracle applications.  Check back often for additions and updates!

Also, see our programmer's web page, http://www.uaex.edu/bknox, a guide for the experienced application programmer that is new to Banner.
 


Night Heron Picture

You Want What???!

(Night Heron courtesy of
The Nature Conservancy)
 

Contents:

SQL and PL/SQL Tips and Tricks:

UNIX Tips and Tricks for Oracle:

Oracle Procedures and Triggers:

For your information, we are running Oracle 9.2.0.6 (started with 7.2.3) on an IBM RS/6000 running AIX UNIX in a Novell client/server network serving Win-XP PC workstations.  Our primary applications are SunGard SCT Corporation's Banner product line including HR/Payroll and Finance (currently 7.3/7.4; started with 2.1.5).  These tips, tricks, and scripts were developed under various versions of Oracle and Banner, and you may need to modify them for your particular version.

Bulletproofing, Backups, and Disaster Recovery Scenarios      [Back]

This presentation shows you step-by-step how to bulletproof your database as much as possible against data loss, gives you the what's and how's of database backups and restores, and takes you through disaster recovery scenarios if you encounter those heart-stopping Oracle errors on database startup, such as datafile corruption or loss, disk drive loss, and other nasties.  Select this link to go to the backup and recovery presentation.  You can also download the slides for the presentation in Microsoft PowerPoint format, including the viewer (totalling around 3,483 K in size).  Select this link to go to the instructions for the slide presentation.  Note that this is a work in progress that I will be adding to and testing as time and opportunities permit beyond what was given at the SunGard SCT conference.

Implementing Data Guard      [Back]

Do you want additional protection for your database, besides just knowing what to do if it crashes?  Oracle's Data Guard is your answer, and it's free!  This presentation shows you step-by-step how to implement and configure a standby database locally or on a remote site so that it's ready to take over your processing at a moment's notice with no data loss.  Select this link to go to the Data Guard implementation presentation.  It includes my SETA Central 2005 PowerPoint presentation entitled "Crashes Happen - Downtime Won't - With Data Guard".

Cross Referencing Tables and Forms Used by a Form      [Back]

Here is a unix script, formtables.shl, which shows which tables are used by the given Oracle form, and how they are used (Select or List of values (LOV), Update, Insert, Delete, or undetermined), which can be used on .fmb (form) and .pll (library) files.   It parses the strings in the form file, and makes a best guess effort in determining the tables used by the form, matching the string patterns against a file listing the non-system tables in the database (generated by formtables.sql).   Since it doesn't analyze the code or trace through the function calls in the attached libraries, or look at database triggers for side effects of table changes, it may not find some table references, but, it does a pretty good job on most form files.   For Banner users, it also shows which forms are called by this form, including form access (query only, etc.).

You will first need to run formtables.sql from sqlplus (using @formtables.sql), logging in as SYS or SYSTEM or as a DBA userid, to generate the list of non-system tables in the database that will be matched by your formtables.shl runs.   (Note: You should also run formtables.sql after at least installing each major upgrade in Banner, such as 3.x to 4.x, and possibly minor upgrades as well, to keep the table list current.)  You may want to edit the resulting formtables.tables file to get rid of any non-Banner tables.   After generating the table listing, you can then run formtables.shl on a form-by-form basis as needed, or on an entire directory of forms using the unix find command.  Both of those ways are shown below (the lines with and following the find command must be all on one line when you type it in; make sure you do a "chmod 755 formtables.shl" in unix before using the script):

formtables.shl $BANNER_HOME/<product>/forms/<formname>.fmb
find $BANNER_HOME/<product>/forms -name '*.fmb'
     -exec formtables.shl {} \;

Another Banner-specific unix script, formcalls.shl, recursively finds all forms which are called by the given form, showing the list of all forms, a pruned tree of called forms, and the complete list of forms with their subforms, including access switches (query only, etc.).   This information can be used in tasks such as developing the list of forms for a class when you're only given a few top-level form names for that class.  Note that it requires that all forms and subforms must be in or linked in the $BANNER_LINKS directory.   Also, be aware that it will not find calls to generated form names, such as those generated by Banner LIST_VALUES_CALL triggers.  Because of the large amount of output produced for some forms, such as the employee information screen with all of its subscreens, you should probably only run this on a form-by-form basis as needed, as shown below (also do a "chmod 755 formcalls.shl" in unix before using the script):

formcalls.shl $BANNER_LINKS/<formname>.fmb

This could be used to find the list of forms called by a set of forms by creating a unix shell script similar to the following (which could take a long time to run, depending on how many forms had to be recursed through):

rm fcalls.out
formcalls.shl $BANNER_LINKS/form1.fmb
cat fcall.out >>fcalls.out
formcalls.shl $BANNER_LINKS/form2.fmb
cat fcall.out >>fcalls.out
... (pairs of lines like above for each form in the set of forms)
sort fcalls.out | uniq >fcall.out
cat fcall.out

Modified versions of the formtables scripts, collector.shl and collector.sql, are available to identify just the list of forms which reference Banner collector tables (or any given set of tables).  The collector.shl script would be run using the "find" command (after first running collector.sql), similar to the formtables scripts:

find $BANNER_HOME/<product>/forms -name '*.fmb' -exec collector.shl {} \;

If you want to find which forms contain a given string, use the formgrep.shl unix script (certainly not to be confused with FormGrep from August Tenth Systems, Inc.!), calling it with the form name and string to search for, such as searching for shrcomc in all forms in the $BANNER_LINKS directory:

find $BANNER_LINKS -name '*.fmb' -exec formgrep.shl {} shrcomc -1 \;

The optional third parameter to formgrep.shl indicates how many lines to show: -1 for no lines (just the file name if it matches), 0 for just the matching line (the default), or greater than zero for the number of lines before and after the matching line to also show.  If you show matching lines, you may need to wade through the junk lines to find what you want.

To show which tables are updated by the given Pro-C (*.pc) or Pro-COBOL (*.pco) program, and how they are used (Update, Insert, Delete), you can use the progtables.shl script.  To find the tables in all of the Focus programs (*.fex) in the current directory, you can use the foctables.shl script.  Run formtables.sql first before doing any progtables.shl or foctables.shl runs.  (Note: We no longer use Focus, so this foctables.shl is my final version of it.)

Using Restricted Built-In's in Any Form Trigger      [Back]

Oracle Form triggers such as when-validate-item don't allow restricted built-ins such as execute_query and navigation routines (like go_item and go_field).  To get around this, you can create a text variable in the block (such as ship_changed, with it's initial value set to 'N'), and set it to 'Y' in the when-validate-item for the field being changed.  Then, create a trigger at the form level (such as ship_change) which checks that flag variable, does the processing, including whatever restricted built-ins, then resets the flag; and put execute_trigger calls to the trigger in the form-level when-new-item-instance and when-new-block-instance triggers.  Also, in order to show the changes immediately if a user types a value into the field and then clicks on a field in a different block on the form, put a couple of go_field calls to jump to the block that needs the focus for the processing, do the processing, then return to the clicked-on block's field.  Sample source code for the form-level ship_change trigger is shown below:

declare
     came_from varchar2(128);
begin
     if :ship_changed = 'Y'
     then
          :ship_changed := 'N';
          came_from := :SYSTEM.CURSOR_ITEM;
          GO_FIELD('FTVSHIP_ADDR_LINE1');
          execute_query;
          GO_FIELD(came_from);
     end if;
end;

If the change routine modifies a field on the form, and you don't want the field's "when-validate-item" trigger to re-validate (since that trigger is fired both when someone types into that field and when a routine updates that field), you can call the set_item_property routine to set the field's state back to valid after your routine changes it so that the when-validate-item trigger doesn't fire because of the change (although, if the user then types into the field, the field's state is then changed back and the trigger will fire).  For example:

set_item_property('vendor_spriden_id',item_is_valid,property_true);

Kevin Davidson sent me another solution to using restricted built-ins in any form trigger, which uses a timer expiring to fire a trigger.  See http://www.arrowsent.com/oratip/tip29.htm.   A second article with this solution is at http://the-big-o.port5.com/article13.shtml.

Adding SQL Scripts to Job Submission      [Back]

Select this link to see how I added SQL scripts to run from Banner job submission.  It uses the runsqlplus.pc Pro-C program in Oracle Scripts.  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

Adding Web Pages to the Self Service Products      [Back]

Select this link to see how I added a web page to the Self Service products.  Our Drivers License update screen was added to be run from the Personal Information menu, and can be used as-is for drivers license entry, or as a starting point (the code is heavily documented) to see how you can add your own web pages to the Self Service products.  It also contains instructions on how to add name and SSN fields to the View Pay Stub Detail web page, along with a Self Service PIN Reset web page, a Banner Password Reset web page, and a Timesheet Approvals web page.  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)  It also shows how to add web pages to any Oracle database, not just Banner.

Converting Employee ID's from SSN to Generated ID's      [Back]

Select this link to see my notes on how we converted employee ID's in Banner from SSN to generated ID's, including an Employee ID Lookup web page.  (Specific to Banner products (versions 5, 6, and 7).  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

How To Fix Banner and Oracle Problems      [Back]

Select this link to see my notes on how to fix problems with Oracle and Banner (mainly SunGard SCT Banner Finance) that we have encountered, such as unqueueing a posting document that is crashing posting.  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

E-Mailing From Oracle      [Back]

Select this link to see how to e-mail from Oracle PL/SQL scripts, which includes my email_files procedure.  This is for Oracle 9.2 and above.  For earlier versions of Oracle, see Running System Commands from PL/SQL Using Pipes below.

Automated Installer for Banner Patches and Bundles      [Back]      (Updated 3/26/08)

Select this link to see our automated installer for Banner patches and bundles.  These scripts are for UNIX platforms.  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

Application Express Installation      [Back]

Select this link to see how to install Oracle's Application Express and it's prerequisites into an Oracle database.  APEX, formerly HTML DB, is Oracle's rapid web application development tool for the Oracle database.  This installation is for the APEX 3.0 version.

Archive/Purge of Banner Data      [Back]

Select this link to see my notes on what we did to archive fiscal years 1998, 1999, and 2000. This includes running SunGard SCT's archive process (foparcp) for fgbtrnd/fgbtrnh, as well as moving old nhrdist records off to a separate database containing just an nhrdist table and it's indexes.  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

Oracle Database Tuning      [Back]

Select this link to read my database tuning topics for Oracle, which I will be adding to as time permits.  These should be generic to any standard Oracle installation, and are not Banner specific.  Current topics include Redo Log Buffer Latches, Database Buffer Cache Size, and Shared Pool Size.  And, be sure to specify optimizer_mode=rule in your init.ora files (i.e., $ORACLE_HOME/dbs/initPROD.ora) for Banner.

Oracle Bug in Resize Datafile      [Back]

I think I've found a bug in resizing a datafile ("alter database datafile 'filename' resize ...;") that will prevent you from doing a "create controlfile". Select this link to read about the resize datafile bug. After further testing, it seems to only be a problem if you try to shrink a datafile such that it is SMALLER than when it was originally created. Also, it does not seem to cause any problems with the Oracle recovery procedures.

If you have any contacts at Oracle, please let them know about this bug and have them get in touch with me to see if we can work something out to fix the problem or correct my understanding or procedures that caused it!

Old Stuff      [Back]

This section contains some old and probably out-of-date information from the earlier days of my web site.  It is mainly here for historical purposes, and mainly for older versions of Oracle and Banner, but may contain a few gems that you can put to use.  As always, be sure of what you are doing beforehand, and use these at your own risk!

Fast Forms Development - Step-By-Step

Do you need to develop a custom form for Banner, but don't know where to start?  Well, this is the place.   This presentation shows you how to get a simple form up and running in under 2 hours, taking you through step-by-step how to create an Invoice Hold Indicator Change form, which is derived from forms that SunGard SCT supplies with Banner.  After creating this form for yourself, you can then use a similar procedure to create your own simple custom forms, and build on your Forms Designer knowledge from there to create more complex forms.  Select this link to go to the forms development presentation, which gives both a Banner 3 version and a Banner 4 version (we stopped using that form when we went to Banner 5/Developer 6i).   (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

Uniform Extent Size Reorganization

Reorganizing your tables and indexes into small, medium, and large tablespaces with uniform extent sizes eliminates fragmentation problems, reduces occurrences of "unable to allocate next extent" errors, and gives you exact space availability and predictable growth patterns for your tablespaces.  Select this link to go to the uniform extent size reorganization page showing how to do this using Ken Payton's gzrrddl script, including a complete log of the reorganization steps I went through and the scripts that I used, along with references to other reorganization web sites and papers.

Banner Password Aging

Select this link to see how to add password aging to Banner so that the users must change their passwords at least once every 6 months in order to continue accessing their screens in Banner.  Note that although Oracle 8 has password aging built in, it is not currently fully integrated with Banner until release 5.4 (Banner General 5.5), at which time all password parameters in an Oracle profile are said to be supported (which we will be testing later on).  (Specific to Banner products.  For security purposes, you will be prompted to enter the name of the Banner job submission screen to view this web page.)

Oracle Technical Support Bulletins

Select this link to see a list of Oracle technical support bulletins and scripts from Rhubarb's Oracle Site.  This isn't a complete list, but there's plenty here for everyone searching for Oracle technical information as well as database tuning and information scripts.  There is also a link to Oracle's web site with the latest list.

Faxing with GNU efax

If you're running Banner on AIX or some other unix system, and if you want to fax documents, such as PO's, you can install and use the GNU "efax" public domain software to send the PO as a fax.  Select this link to see the instructions on how to customize and set up efax on AIX so that you'll have a unix command line fax command available for you to use.  (Producing a PO file as text or other format supported by efax is not covered here.)

Oracle Scripts      [Back]

These scripts and procedures, which are mainly for Oracle DBA's, are what I use almost daily to maintain our Banner Oracle database.   I've indicated in the table below which ones are specific to Banner products.   The .sql files listed in the table are sql scripts that you can download and run (which may need to be edited first - see Notes below).  The .txt files are ascii text descriptions of the scripts, suitable for being downloaded as help files, and, in some cases, contain comprehensive explanations of the procedures (such as resize.txt and the move procedures).   The .shl files are unix scripts (IBM AIX).  There are also scripts in some of the Tips and Tricks entries which aren't included here.

all_rights.shl Used by other scripts to grant all rights to files produced (unix).
autoora.sql Create the Focus .acx and .mas table descriptor files for the given table/view name or wildcard and table/view owner or wildcard.  (Generic to any Oracle database product.  Note: We no longer use Focus, so this is my final version of this script.)
bigsegsown.sql Find the largest segment (table or index) for each owner, showing its size and its percentage of that owner's current data.  (Generic to any Oracle database product.)
bigsegsts.sql Find the largest segment (table or index) in each data tablespace, showing its size and its percentage of that tablespace's current data.  (Generic to any Oracle database product.)
collector.shl

collector.sql

Shows which collector tables (or any given set of tables) are used by the given form (.fmb), and how they are used (Select, Update, Insert, Delete).  (Does not search through attached library files or triggers for references, so, it may miss some tables.)  Run collector.sql first before doing any collector.shl runs.  See Cross Referencing Tables and Forms Used by a Form.
comptables.sql Compare a table's records between two databases (local and remote), showing the records in one database which don't match the corresponding records in the other database.  See Comparing Tables Between Databases.  (Generic to any Oracle database product.)
datein.txt

datein.sql

Shows which tables in Banner contain the given activity date, including a count of the records with that date in each of the tables.  (Specific to Banner products.  Also see datesin.sql.)
dateinminmax.sql Shows which tables in Banner contain the given range of activity dates, including a count of the records with those dates in each of the tables.  (Specific to Banner products.)
datemax.sql Show the maximum activity date value for each table, sorted from earliest to latest maximum activity date.  (Specific to Banner products.)
dates.sql Shows the activity dates in a given Banner table, along with counts of records containing those dates.  (Specific to Banner products.)
datesin.sql Shows which tables in Banner contain the given range of activity dates (plus an optional pidm), including a count of the records with that date in each of the tables.  (Specific to Banner products.   Also see datein.sql.)
dbbackup.shl
dbb_gen_all.shl
dbb_gen_list.shl
dbb_gen_cmds.shl
dbb_overview.sql
dbb_ctlfile.sql
dbb_index_stats.sql
A generic version of our set of database backup scripts, which we run nightly as a cron job from userid oracle for cold backups.  (Should be generic enough for any Oracle installation that follows standard naming conventions such as Optimal Flexible Architecture (OFA), with the upper-case instance name in the directory structure.  Change the scripts to match your directory structure and database instance names - select this link to see our backup scripts instructions.)  Runs datafile zips in parallel (as background processes) to reduce database downtime during backup by 75%.
delpidm.sql Creates sql to delete all records containing a given pidm in all Banner tables, which you can edit and run.  (Specific to Banner products.)  Note:  The delfield.sql script should probably be used instead of this.
delfield.sql Finds all tables containing a field with a name like a given substring (such as ACTIVITY_DATE), and creates sql to delete the records in those tables where that field contains a given value, list, or wildcard.  (Can be used with any Oracle database product if "Banner specific" lines removed or changed.)
fieldin.sql Finds all tables containing a field with a name like a given substring (such as ACTIVITY_DATE), and counts the records in those tables where that field contains a given value, list, or wildcard.  (Can be used with any Oracle database product if "Banner specific" lines removed or changed.)
foctables.shl Find the tables in all of the Focus programs (*.fex) in the current directory.  Run formtables.sql first before doing any foctables.shl runs.  See Cross Referencing Tables and Forms Used by a Form Note: We no longer use Focus, so this is my final version of this script.
formcalls.shl Recursively finds all forms which are called by the given form (.fmb), showing the list of all forms, a pruned tree of called forms, and the complete list of forms with their subforms, including access switches (query only, etc.). Banner specific.  See Cross Referencing Tables and Forms Used by a Form.
formgrep.shl Searches for occurrences of a given string in a form (.fmb), showing the matching line(s) and, optionally, the surrounding lines, or just showing the matching form name.  See Cross Referencing Tables and Forms Used by a Form.
formtables.shl

formtables.sql

Shows which tables are used by the given form (.fmb or .pll), and how they are used (Select, Update, Insert, Delete), along with which forms are called by this form (for Banner forms).  (Does not search through attached library files or triggers for references, so, it may miss some tables and form calls.)  Run formtables.sql first before doing any formtables.shl runs.  See Cross Referencing Tables and Forms Used by a Form.
grants_made.sql List all tables with privileges granted to users (no roles or Banner or system userids).  (Generic to any Oracle database product.)
grants_recvd.sql List all users with tables granted privileges to (no roles or Banner or system userids).  (Generic to any Oracle database product.)
kill_user.txt

kill_user.sql

Kills the Banner and sqlplus sessions of a given user, listing the users currently logged on to select from.  (Generic to any Oracle database product.)
monitor.shl

monitor1.shl

monitor.sql

Monitors .log files in /home/jobsub directory for posting errors and archivelogs filling up too fast (runaway process?), notifying operator console of them until monitor.lst is deleted.  Ours is set up in cron from root to check every 10 minutes (0,10,20,30,40,50 8-16 * * 1-5 /usr/bin/su - jobsub "-c sh monitor.shl").  (Specific to Banner products and AIX Unix.)
moveindx.txt

move_indexes.sql

Moves all specified indexes, wildcards accepted, to a separate tablespace using drop/add, including rebuilding references.   Specify same tablespace name to recreate (thus, compress) all indexes.  (Generic to any Oracle database product.  Assumes primary key names begin with "PK_".  Edit to use original next_extent (default) or current pctincrease next_extent.)  Note: This is a very old script and may not work or work well with current versions of Oracle.
moveuser.txt

move_user.sql

Moves a given user's tables and indexes to separate tablespaces using multiple import passes with different default tablespaces.   The moveuser.txt file contains sql commands to determine how big the tables and indexes tablespaces should be initially.  The script contains some neat tricks, which you may want to learn.  Note: This is a very old script and may not work or work well with current versions of Oracle.
pidmin.txt

pidmin.sql

Shows which tables in Banner contain the given pidm, including a count of the records with that pidm in each of the tables.   (Specific to Banner products.)  Note:  The fieldin.sql script should probably be used instead of this.
progtables.shl Show which tables are updated by the given Pro-C (*.pc) or Pro-COBOL (*.pco) program, and how they are used (Update, Insert, Delete).   Run formtables.sql first before doing any progtables.shl runs.  See Cross Referencing Tables and Forms Used by a Form.
recreate_index.sql Recreates (drop/rebuild) a regular or primary key index to free up deleted space for a given index and owner, including rebuilding references.  (Generic to any Oracle database product.  Assumes primary key names begin with "PK_".  Edit to use original next_extent (default) or current pctincrease next_extent.)  This can also be done in Oracle 7.3.4+ using the alter index command, such as in: "alter index posnctl.nhrfinc_key_index rebuild unrecoverable tablespace large_indexes;".
resize.txt

resize.sql

Calculates the new table/index sizes for gurrddl for a given number of records per extent for those tables that are over a given percentage full.  The resize.txt file gives a full explanation of resizing, including gurrddl, maxextents, and export/import.
resize_table.sql Calculates the new table/index sizes for gurrddl for a given number of records per extent for a given table (single-table version of resize.sql).
runsqlplus.pc This program takes the .sql script and parameters from jobsub and passes them to sqlplus using an input file; afterwards, deleting the input file and corresponding records from the collector table.  Put it in $BANNER_LINKS and compile it for use with "Adding SQL Scripts to Job Submission".  (Specific to Banner products.)
stub.sql

stub.txt

Generates SQL to create a database using the current database as a model, including all of it's logfiles and logfile groups, system datafiles, all tablespaces and their datafiles and default storage settings, and all rollback segments, along with running the Oracle catalog procedures.  See Cloning a Database using Export/Import.
tabinfo.sql

tabinfobig.sql

Reports information about one or more tables, including sizes, columns, indexes, primary key, foreign keys, constraints, triggers, and references to a given .lst file name; originally by Biju Thomas, with updates. tabinfobig is for output >1,000,000 bytes. (Generic to any Oracle database product.)
table_changes.sql Lists the table definition changes and added/deleted tables between the current (post-upgrade) database and another (pre-upgrade) database.
terminated_ids.sql Shows the Banner user ID's for terminated employees who's accounts are not yet locked or deleted, the objects (tables) they own, and the commands to lock or remove them.  (Specific to Banner products.)
tuning.sql

tuning2.sql

Performance tuning scripts - the first by David Midgett at Eastern Kentucky University; the second was from http://www.oramag.com/code/cod46dba.html (no longer available).
userlocks.sql Shows which user sessions have locks against which tables and other objects, and the commands to kill those sessions (in case an aborted session still has locks on objects).  (Generic to any Oracle database product.)
usertables.sql List all tables and their owners and record counts in the USERS tablespace.  (Generic to any Oracle database product.)
vercheck.sql

vercheck.shl

Check the version numbers in the forms against the version numbers in Banner for any mismatches, as well as for any versions not at a given point release.  (Specific to Banner products.)
versions.sql Shows the current Banner product versions, Oracle version, host name, and database name.  (Specific to Banner products.)
view_or_print.shl Used by other scripts to view and/or print their results (unix).

whoson.sql

Shows who is currently logged into Banner, either through Banner GUI (shows form name) or sqlplus (shows SQL*Plus) or as a process (such as for jobsub), for the current database.  (Generic to any Oracle database product.)
whossql.sql A modification of an older version of the whoson.sql script to also show the SQL currently being executed or the most recent SQL executed by the user.
whowebbed.sql Shows who has accessed Self Service in the past 3 days (from Penny Ginn), as well as those currently on Self Service (from John Wade).  (Specific to Banner products.)

If you discover any problems or omissions in these scripts, please contact me at srea@uaex.edu.

Notes:  Some of these scripts may be specific to or have references to SunGard SCT Corporation's Banner modules, such as HR/Payroll, Finance, and Student, so, you may need to edit those scripts to work with your own 3rd-party applications.  Also, there may be references to /home/common and /home/dba_scripts in the scripts, which is where we keep our scripts, which you will probably need to change to reflect your directory structure.

Disclaimer:  As with all software, especially where it affects your vital data, make sure that you examine theses scripts and that you understand what they do before you use them to see if they would have any adverse effect on your particular setup or database layout, especially the ones that reorganize your database, and make a full backup of your database in case you have to revert to your original copy of the database before the scripts were run.  Use these scripts at your own risk.  As a condition of using these scripts, you agree to hold harmless both the University of Arkansas Cooperative Extension Service and Stephen Rea for any problems that they may cause or other situations that may arise from their use, and that neither the Extension Service nor I will be held liable for those consequences.

Some Useful Oracle Links      [Back]

With Banner Info:

http://www.uaex.edu/bknox - A guide for the experienced application programmer that is new to Banner, by our own Bruce Knox.
http://www.suu.edu/it/admin/bestpractices - Banner and Oracle Best Practices, by April Sims.  Includes presentation and information on creating Data Guard logical standby databases (instead of physical standby databases that I show).
http://www.utm.edu/staff/lholder/dba - Larry Holder's DBA Page.  Includes his "New DBA Survival Guide" presentation.

Just Oracle:

http://www.oracle.com - Oracle Corporation's Web Site.
http://education.oracle.com - Oracle Corporation's Education Site.
http://SearchOracle.com - Tips, scripts, news, white papers, ask the experts, discussion forums - lots of neat stuff!
http://www.orafaq.org - The Underground Oracle Frequently-Asked Questions List (especially the Oracle Database Administration pages) by Frank Naudé (from South Africa!).  Also reached via http://www.orafaq.net. FAQ categories are at http://www.orafaq.org/faq2.htm.
http://www.orafans.com - ORACLE User Forum and Fans Club (especially the ORACLE Technical Papers pages).  Site no longer available?
http://www.oraclefans.com - Info from various sites on their pages, such as machine-based FAQ's (eg., AIX and Solaris) from faqs.org in their Links page (not FAQ's page).
http://www.OracleTuning.com - Scripts and articles for DBA's.
http://www.dbresources.com - Scanning the web for Oracle articles or news?  Check out this compilation.
http://www.bijoos.com/oracle/index.htm - Biju's Oracle Page - Scripts, Utilities, Source code generators, etc.
http://www.oracle-books.com/oracle - Rhubarb's Oracle Site (from which came the Oracle Technical Bulletins).
http://www.fortunecity.com/skyscraper/oracle/699/orahtml/index.html - A bunch of articles (tuning, etc.) for Oracle DBA's (another Rhubarb collection).
http://www.fors.com/orasupp - More articles by Oracle Worldwide Customer Support (on a Russian site, no less!).  Includes some of the older Oracle Technical Bulletins.
http://www.szofi.hu/index_link.html#Oracle - Szofi Link Exchange - tons of links, not only Oracle, but other programming languages and operating systems as well.
http://the-big-o.port5.com - Oracle Tips, Tricks, Hints, and How-To's, including Oracle Forms articles and general database articles.
http://www.think-forward.com - Adelante, Ltd, Computer Consultants, with scripts and tips (currently restricted), including a UNIX to VMS Translation Table (included here; from Britain).
http://www.vb-bookmark.com/vbOracle.html - Oracle Bookmark with Oracle and Perl sites containing articles, tutorials, tips, tricks, guides, and samples.
http://www.tusc.com/oracle/download/categories.html - Years of PowerPoint presentations, including lots of Oracle 9i stuff.
http://home.clara.net/dwotton/dba/oracle_extn_rtn.htm - Calling External routines from PL/SQL.

My Reference Book Library      [Back]

These are some Oracle and other books that I own and use quite frequently.  The book covers shown below are from my original 7.x library.  The 7.2 edition of Oracle: The Complete Reference is just the book, but the 7.3 "Electronic Edition" and later editions have a CD-ROM with a .pdf version of the book.  The Oracle Backup and Recovery Handbook goes into much greater detail than my presentation can offer, and covers VMS as well as UNIX.  And, if you had wanted to take the tests to become an Oracle 7.x Certified Professional, but couldn't afford their classes, the OCP Training Guide was the next best thing - comprehensive, concise and to-the-point, without the fill and fluff in other books, but somewhat weak on disaster recovery scenarios.  Too bad there's not a later version of it, but, you could use it to learn a lot of the basics (SQL, PL/SQL, administration, tuning, and backup and recovery).  I am also using earlier versions of the unix book (now in its 4th edition) and the vi editor book (now in it's 6th edition).  To see descriptions of them, in association with Amazon.com, just click on their covers or version/edition numbers.

Oracle: The Complete Reference - link to amazon.com book description

Oracle Backup and Recovery Handbook - link to amazon.com book description

OCP Training Guide: Oracle DBA - link to amazon.com book description

Unix in a Nutshell - link to amazon.com book description

Learning the vi Editor - link to amazon.com book description

Oracle: The Complete
Reference
(and see 7.3, 8i, 9i, 10g versions)

Oracle Backup
and Recovery
Handbook
(and see 8i version)

OCP Training
Guide: Oracle DBA
(7.3 version only)

Unix in a
Nutshell
(and see
4th edition)

Learning the
vi Editor
(and see 6th edition)

Perl Online Documentation      [Back]

If you want to get started learning Perl, which will be used for some of the scripts for future Banner releases, select this link to view the Perl online documentation from the book, "Cross-Platform Perl" by Eric F. Johnson (and see 2nd edition).  The book also contains a CD-ROM with the Perl source code, which you can compile on various UNIX platforms, as well as Windows (95 and NT) binaries for Perl, along with the scripts from the book and other contributors.  You can get more information on Perl from http://www.perl.com and download Perl for various platforms from http://www.perl.com/pub/language/info/software.html.

Cross-Platform Perl - link to amazon.com book description

Humor Me and Other Sayings      [Back]

And, finally, these don't have anything to do with this site's subject (?), but they have given me and others of you quite a few chuckles, and, sometimes you've just got to lighten up a bit.  You might want to post some (or all) of them above your desk (I've run out of room!), and refer to them frequently, especially during those high-stress "What happened to the database?" times!

Things to Keep in Mind
Dr. (Techno) Seuss
English Can Be a Silly Language
Gentler Ways to Say Someone is Stupid
More One-Liners
Yesterday: A DBA's Backup Song
"God Speaks" Billboards
Evolution of a Programmer
Mergers and Acquisitions
Time is Short
A Different Point Of View

Technology for Country Folks
Badtimes - A Really Nasty Virus
Gems from Josephus

When a person does a good deed, when he or she didn't have to,
God looks down and smiles and says, "For this moment alone, it was worth creating the world."

Steve and Nancy Rea - Our Wedding - April 23, 2004

Hawaii - March 11, 2005

Disney - April 6, 2006

You Are
Visitor Number

Hit Counter

Privacy Statement

Link to CES Home PageBack To CES Home Page Back to top of this pageBack To Top


© 2006
University of Arkansas
Division of Agriculture
All rights reserved.
Last Date Modified 02/09/2008
Webmaster

University of Arkansas • Division of Agriculture
Cooperative Extension Service
2301 South University Avenue
Little Rock, Arkansas 72204 • USA
Phone (501) 671-2000 • Fax (501) 671-2209
 

MissionDisclaimerEEO
PrivacyFOI