By Ian Jones, Sunday, August 15, 2004.
refreshdb is a Bourne shell script that allows the "refreshing" of data on an Informix IDS 7.x/9.x database from another database. Partial or full data and schemas can be copied from the source database, referential integrity may be kept too.
Version: 2.1
Requirements: UNIX, Informix IDS 7.x/9.x

refreshdb is a UNIX Bourne shell script that can be used when needing to copy data from one Informix database to another without wanting to use a time-consuming backup and restore process or the high performance loader.

The refreshdb script allows for a sub-set of the source database's data to be retrieved and loaded into the target database while maintaining full referential integrity by specifying the data selection SQL. Tables that are to be fully refreshed from the source database do not need to have any SQL specified.

refreshdb may also be used to only partially refresh a target database by specifying which tables to include or exclude from the process, tables may just be cleared out on the target too.

All configuration parameters can be held in simple configuration files, some may be specified on the command line.

The script does not require any user intervention once started so may be used quite happily in a batch process.

I regard it as software that gets the job done, it's not pretty, and not a true reflection of my skills, but it did the job for me!

Change History:

REL-2.1 - 15/08/2004:

  • Bug Fix: Test of whether to show MAXPROC_* message failed due to == in test condition on some platforms. Should have always been single =.

REL-2.0 - 31/10/2003:

  • Implemented MAXPROC_UNLOAD and MAXPROC_LOAD as replacement of MAXPROC parameter to allow a differing number of parallel processes for the unload and load stages. This was implemented because it was found that in most cases there are less issues with multiple unloads than loads, more could be done at once. Splitting MAXPROC into two parameters allowed for this tuning.
  • Only show one "MAXPROC* level (num) hit …" message per wait, instead of wasting log space by repeating the same message unnecessarily.

REL-1.6 - 10/09/2003:

  • Fixed daft "feature" that enabled triggers, indexes and constraints after each chunk of data was loaded. Now enables after all chunks loaded. Seriously improves the speed of the script!
  • Various small updates to supporting files and added contact details.

REL-1.5 - 08/09/2003:

  • Fixed bug where one more process ran than requested.
  • Removed -a from split again (oops).

REL-1.4 - 25/08/2003:

  • Fixed bug where REFSQL file always used "refreshdb.ref" for file.
  • Changed the split of the unload file to happen on unload rather than load to allow more than one load after initial unload complete.
  • Uses lock mode of wait and committed read for isolation level.
  • Updated and added a number of comments to source.
  • Updated example configuration files with better and more generic example data.

REL-1.3 - 01/07/2002:

  • Initial public release.