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

 
Steve Rea's Oracle and SunGardHE (Ellucian)
Banner Tips, Tricks, and Scripts

Featuring:

Bulletproofing, Backups, and Disaster Recovery Scenarios
 
Implementing Data Guard
 
RMAN Backups and Cloning
 
Cross Referencing Tables and Forms Used by a Form
 
(This Page was Last Updated on 05/16/12)

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

Note:  I added several sections on 3/29/12 to this web page.  Check them out!

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 for over a dozen years, downloadable scripts that I and others have developed for maintaining Oracle databases and gleaning information about the SunGardHE 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 third-party Oracle applications.  Check back often for additions and updates!

Also see Bruce Knox's web site, www.uaex.edu/bknox, for Banner Reporting Solutions.

Night Heron Picture

You Want What???!

(Night Heron courtesy of
The Nature Conservancy)
 

Our $2,000 Special!

If you are running short on staff or time, I would be glad to help you with your WebLogic and Fusion Middleware installations, implementing RMAN backup and recovery, setting up DataGuard standby database(s), doing Oracle installs and upgrades, or whatever else you may need done with Banner and Oracle. I am also learning SharePlex now, in case you need help with Quest's "DataGuard on Steroids", as I call it.

Most of these tasks can be done in a day or two, and not more than a week, with no complicated and expensive contracts involved, and with most tasks running just a fixed $2,000. That's right! Just $2,000 for most tasks! So, if you need it done now and fast and economical, you know whom to e-mail or call - Stephen Rea - a known commodity to all of you in the Banner and Oracle communities.

Contact:
Stephen Rea
Putting Innovation to Work
E-Mail: srea1957@yahoo.com
Phone: 501-944-7486

Contents:

SQL and PL/SQL Tips and Tricks:

UNIX Tips and Tricks for Oracle:

Oracle Procedures and Triggers:

These tips, tricks, and scripts were developed under various versions of Oracle and Banner, and mainly under Linux and AIX Unix, and you may need to modify them for your particular version or operating system.

WebLogic and Fusion Middleware Installation      [Back]      (added 3/29/12)

There has been a lot of nervousness about upgrading to WebLogic and Fusion Middleware.  With dozens of FAQ's and manuals, no wonder.  It took me about a month and a half to pour through all of those documents and to install WebLogic and Fusion Middleware on a clean Linux server.  I've written all of my notes and steps down, and have posted them here, so, hopefully, what took me a month and a half to do, you can do in under a week.  And, with the time pressure we are under from SunGardHE and Oracle to get this done, this is being posted in the nick of time.  Happy installing!

Restarting WebLogic Processes      [Back]      (added 3/29/12)

As a companion to the WebLogic and Fusion Middleware Installation above, I'm also including my instructions with the steps to stop and restart the PROD database, WebLogic, NodeManager, and opmn on a Linux server.  It's basically just a step-by-step copy-and-paste operation, which helps me to not forget any of the steps.

Bulletproofing, Backups, and Disaster Recovery Scenarios      [Back]

This page 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.  You can also download the slides for the presentation in Microsoft PowerPoint format, including the viewer (totalling around 3,483 K in size).  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 SunGardHE 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 page 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.  It includes my SETA Central 2005 PowerPoint presentation entitled "Crashes Happen - Downtime Won't - With Data Guard".  It also includes a step-by-step description of the live payroll test (yikes!) that we did on the standby in "Switching Primary and Standby for Disaster Planning Tests".  But, wait!  If you want to see how to do this using RMAN, check out the topic below.

RMAN Backups and Cloning      [Back]

What is this thing called RMAN, and how do I use it?  How about backing up your database quickly, either a full backup or an incremental backup, without taking your database down?  How about cloning your database, either on the same server or across servers?  How about creating a Data Guard standby database for your primary database on another server?  How about restoring your database quickly if it becomes corrupted or if data is accidentally deleted?  And. if you don't want to bother with the intricacies of RMAN, I even have scripts to back up one or all of your databases on a server, either fully or incrementally, and to clone your database from an RMAN backup.  Select this link to see my RMAN Backups and Cloning page, where I take you step-by-step through these tasks, making you an RMAN expert in a day!

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.

Creating a csv File in Oracle      [Back]      (added 3/29/12)

Below is a method for creating a csv (comma separated value) file using SQL.  This example shows how to create a csv file for "select * from sfrfaud where sfrfaud_pidm = 271397 and sfrfaud_term_code = '201130';"

sqlplus / as sysdba
set pagesize 1000
column spriden_id format a9
column spriden_first_name format a15
column spriden_mi format a15
column spriden_last_name format a15
select spriden_pidm,spriden_id,spriden_first_name,spriden_mi,spriden_last_name
    from spriden where spriden_id in ('S00531521','S00271397') and spriden_change_ind is null;
        SPRIDEN_PIDM SPRIDEN_I SPRIDEN_FIRST_N SPRIDEN_MI SPRIDEN_LAST_NA
        ------------ --------- --------------- --------------- ---------------
        271397 S00271397 Geralyn R. Ayala
        532912 S00531521 Ramiro De Los Santos
set pagesize 0
set feedback off
set linesize 2000
set trimspool on
set recsep off
column column_id noprint
spool csv1.sql
select 0 column_id,'select' from dual
union all
select column_id,decode(column_id,1,'','||'',''||')||''''||column_name||''''
    from dba_tab_columns
    where table_name = upper('sfrfaud')
    union all
    select 9999,'from dual;' from dual
    order by 1;
select 0 column_id,'select' from dual
    union all
    select column_id,decode(column_id,1,'','||'',''||')||
    decode(data_type,'VARCHAR2','''"''||'||column_name||'||''"''',
    'DATE','to_char('||column_name||',''MM/DD/YYYY'')',
    column_name)
    from dba_tab_columns
    where table_name = upper('sfrfaud')
    union all
    select 9998,'from sfrfaud' from dual
    union all
    select 9999,'where sfrfaud_pidm = 271397 and sfrfaud_term_code = ''201130'';' from dual
    order by 1;
spool off
!grep -v '^SQL' csv1.sql | grep -v '^ ' >csv.sql
!rm csv1.sql
spool sfrfaud_271397.csv1
@csv.sql
spool off
exit
!grep -v '^SQL' sfrfaud_271397.csv1 >sfrfaud_271397_$ORACLE_SID.csv
!rm sfrfaud_271397.csv1

Locating strings or substrings in Oracle tables      [Back]      (added 3/29/12)

This example (similar to fieldin.sql) shows how we can find where "PROD8" occurs in the wtailor tables by running the SQL produced by the following:

sqlplus / as sysdba
set pagesize 1000
set linesize 160
select 'select distinct ''' || column_name || ''' "COLUMN" from ' || owner || '.' ||
table_name || ' where ' || column_name || ' like ''%PROD8%'' union' from dba_tab_columns
where owner = 'WTAILOR' and data_type = 'VARCHAR2'
union
select 'select null from dual;' from dual;
run the above sql, which shows:
COLUMN
-----------------------------
TWGBGLUI_SYSTEM_NAME

Finding the Self-Service pin for a particular SPRIDEN ID (FAQ 1-3R1ZCV)      [Back]      (added 3/29/12)

select gorpaud_pin
    from gorpaud a
    where a.gorpaud_pin is not NULL
    and a.gorpaud_pidm in (
        select spriden_pidm from spriden
        where spriden_id = '&ID')
    and a.gorpaud_activity_date in (
        select max(gorpaud_activity_date)
        from gorpaud b
        where a.gorpaud_pidm = b.gorpaud_pidm
        and b.gorpaud_pin is not NULL);

Finding the Oracle password for a Banner ID      [Back]      (updated 3/31/12)

Until Oracle fixes this HUGE SECURITY HOLE, you can usually find someone's Oracle password (if they have logged into INB lately) by looking at the INB (Internet Native Banner) Apache logs, as shown below (in this case, the Apache logs are in /opt/app/oracle/product/10gFR_1/Apache/Apache/logs).  It takes a while to run, depending on the total size of the Apache logs in the logs directory, but it does show the clear-text password used to log into INB.

cd /opt/app/oracle/product/10gFR_1/Apache/Apache/logs
grep <lower case user ID> access_log* | grep ltc | tail
    see the ltc value, which contains the clear-text password!

UPDATE:  It looks like Oracle did fix this with 10.2 IAS (OAS).  I ran this at a site that has 10.2, and it didn't display the clear-text password.  So, this may be a problem for 10.1 and earlier.  So, be sure to update your IAS to beyond 10.1, if you haven't already done so, to get around this security hole.

Adding SQL Scripts to Job Submission      [Back]

Adding SQL Scripts to run from Banner job submission is fairly easy.  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]

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]

We have converted our employee ID's in Banner from SSN to generated ID's.  Here are my notes on how we did this, 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]

Here are my notes on how to fix problems with Oracle and Banner (mainly SunGardHE 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]

Here is how we e-mail from Oracle using PL/SQL scripts, which includes my email_files procedure that not only sends text e-mails, but also HTML e-mails plus multiple attachments of various types.  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]

Our automated installer for Banner patches and bundles (autopatch) is a companion to SunGardHE's automated installer for Banner upgrades.  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]

We have also installed 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]

To free up space in Banner's database, we archived fiscal years 1998, 1999, and 2000.  This includes running SunGardHE'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]

I have a few 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 page 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 SunGardHE 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.  This forms development page 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

Before Oracle got into the act, we had a procedure for password aging in Banner, where 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 supported.  (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, which is no longer.  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@maristream.org.

Notes:  Some of these scripts may be specific to or have references to SunGardHE 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.

Some Useful Oracle Links      [Back]

With Banner Info:

http://betwinx.com - Banner Reporting Solutions by Bruce Knox.  Includes information and scripts for SQL, Argos, MS Access, and Application Express.
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.

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."

Our Wedding - April 23, 2004

Hawaii - March 11, 2005

Disney - April 6, 2006


You Are Visitor Number

This Page Was Last Updated on 04/10/12

Copyright © 2009 by Maristream, LLC.   All information, scripts, forms, and other material
on this web site are freely available to all Banner and Oracle Database Administrators,
Systems Administrators, Programmers, and others that may need it.

The webmaster who maintains this web site may be reached at srea@maristream.com.

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.  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 Maristream and Stephen Rea for any problems that they may cause or other situations that may arise from their use, and that neither Maristream nor I will be held liable for those consequences.