
readme.txt


README for WebSphere Product Center, version 5.3.1, bad blob detect and cleanup scripts.
Version of January 17, 2007
Copyright 2007 IBM Corporation

NOTE: This readme is for people interested in just the bad blob scripts.  
If you're interested in ghost items detection and cleaning, you should close this file and open readme_ghostitems.txt instead.


----------------------------------------------------------------------------------------------------
INTRODUCTION
----------------------------------------------------------------------------------------------------

Two shell scripts doreportblob.sh and docleanblob.sh are delivered.  The first reports the items, if any, in a given WPC Catalog
that have corrupted serialized forms.  The second purges (the latest version) of such items from that catalog, 
and also reverts (i.e. undoes) all checkouts of such items to collaboration areas associated with this source catalog.
Thus work in progress in collaboration areas will be deleted by docleanblob.sh.


----------------------------------------------------------------------------------------------------
REQUIRED PRELIMINARY SETUP STEPS in the database (prior to running any of the shell scripts)
----------------------------------------------------------------------------------------------------

1. Give the Oracle user either the "CREATE SNAPSHOT" or the "CREATE MATERIALIZED VIEW" privilege.

2. Using sqlplus and logging into your WPC database, run @drop_indexes, @create_indexes, @drop_backup_tables, @create_backup_tables.


NOTE:   Be sure to carry out these steps each time you use a new version of these scripts, even if you have previously done these steps
when using a prior version of these scripts.  Also, repeat these steps when switching between the "badblob" scripts and the "ghost items" scripts.


----------------------------------------------------------------------------------------------------
OTHER REQUIRED PRELIMINARY STEPS
----------------------------------------------------------------------------------------------------

1. Unpack the zipfile containing the scripts into any directory.  The usual WPC environment variables need to be defined ($TOP, $JAVA_RT).

2. The shell scripts require the database connection that is to be used, to be the one that is currently 
entered in $TOP/etc/default/common.properties.  Thus be sure you have the right values entered there. 
Both the bad blob and the ghost items scripts (see below) also require the (same) database connection 
information to be explicitly supplied in their command line arguments.

3. Although not strictly required, it is a good idea to shutdown WPC when running these shell scripts.

4.  Create (by hand) the directory '$TOP/logs/reportLog', to store the "longer reports" generated by running the shell scripts 

The shell invocations of the two shell scripts doreportblob.sh and docleanblob.sh produce brief sufficient output on the console about what they did.  
The above directory is where longer reports from each of their runs will be stored.  

The filenames of the long reports define the nature and time of the run, for exmample:

  56 -rw-r--r--    1 darnon   unixuser    50048 Jan 15 15:31 console_reportblob_Jan_15_2007_163028.txt
   8 -rw-r--r--    1 darnon   unixuser     5606 Jan 15 15:31 reportblob_Jan_15_2007_163028.txt

  24 -rw-r--r--    1 darnon   unixuser    21949 Jan 15 15:31 cleanblob_Jan_15_2007_163028.txt
  44 -rw-r--r--    1 darnon   unixuser    40047 Jan 15 15:31 console_cleanblob_Jan_15_2007_163028.txt

The first two are what you get from a run of doreportblob.sh. 
When you run docleanblob.sh, you would get all four files above.  This is because docleanblob.sh itself invokes doreportblob.sh.

The "long reports" are the files  reportblob_Jan_15_2007_163028.txt and cleanblob_Jan_15_2007_163028.txt.  The filenames beginning
"console..." are copies of the console output produced from the actual invocations of the shell scripts.

The longer reports are not intended to be either economical of output (rather, they are verbose), 
or understandable by the customer (rather, they are only understandable by IBM).   
The longer reports are generated only as a backup audit trail.  If they are needed, they should be sent to IBM for analysis.

=========================================================================================================================
"BAD BLOB" SHELL SCRIPT USAGE INSTRUCTIONS
=========================================================================================================================

The basic usage cycle for bad blob detection is: run doreportblob.sh and see if it finds any corrupted items.  If so, then run docleanblob.sh

You can get usage instructions for each script by just typing its name without arguments to a command line.
For example, type to a shell prompt:
    > doreportblob.sh
This will return the following six or so lines of output:
	Usage 
	doreportblob.sh --db=databasename --dbuser=dbusername --dbpassword=dbuserpassword --cmpName=cmpName --ctgId=ctgId
	    where databasename, dbusername, and dbuserpassword are viewable in the WPC System Administrator > Properties menu
	    and ctgId is the (numerical) id of a 'source' catalog in company 'cmpName'.
	    ctgId is obtainable via the WPC DBAdmin screen, with the query 'select ctg_id from ctg where ctg_name = CATALOGNAME'.
	
	Sample command line: doreportblob.sh --db=wpcdb --dbuser=wpc1 --dbpassword=wpc1 --cmpName=wildwest --ctgId=99

The command line for docleanblob.sh is similar.

Thus note that doreportblob.sh and docleanblob.sh operate on a single source catalog.


-------------------------------------------------------------------------
END OF README.TXT
-------------------------------------------------------------------------



