# Description for using "registry" shell scripts # Disclaimer: These programs have been implemented in High Availability/Mission Critical environments so I know they work. But your environment may be different so, you need to use caution when implementing these scripts. Please read this file and the README.registry file compleatly before starting to implement these scripts. What I am saying is that these scripts are offered as is with no warranty or liability. If they cause a problem or destroy your database I am not responsible. Now that my lawyers are happy, let's get to it. Initial Setup: There is some initial setup required to run the programs. Generally, I setup a directory named $SCRIPTS (/home/progress/scripts) in this directory I place all of the files before they are ready for testing and implementation. In the $SCRIPTS directory, I then create a subdirectory named "live" where the programs get moved when they are ready for testing and implementation. The programs are designed to look for a $SCRIPTS/live directory so this is not optional. Some other subdirectories need to be created for the programs to work properly. These directories are: logs, logs/archive, pf_files, pipedir and tmp. Descriptions: $SCRIPTS - This is the base directory. $SCRIPTS/live - production code directory $SCRIPTS/logs - "Current" log file directory (Used by: backup_db and swai) $SCRIPTS/logs/archive - "Archived" log files $SCRIPTS/pf_files - Parameter file directory (Used by: start_db) $SCRIPTS/pipedir - pipefile directory (Used by: backup_db) $SCRIPTS/tmp - Scratch files directory When you first place the code in the $SCRIPTS directory make sure you set it up as READ ONLY. Only add execute permission after reviewing the code and determining who, in anyone, you want to have execute permission for a particular function. Progress provides you with a little safety net (ie. Only root or the user who started a database broker (server) can shut it down). But don't rely on Unix or Progress to save you. There are some very useful functions in this library that are also very dangerous. So, take care when placing these on your system and test all of the code in a test environment BEFORE allowing anyone to use it against your production databases. db.registry setup: The first file to move into live is the "db.registry" file. This file is the core of the system and contains vital information for each database that you want to work with these programs. This file has a unique format (see README.registry) that must be followed in order for the programs to work properly. Create a "test" database in the registry file to do some initial testing. Once you get some functions working against test you can add more databases. Once the db.registry file has be moved and a test database has been added then the "read_registry" and "test_registry" files should be moved into live and execute permission should be added so you can begin testing. The output of test_registry looks like this: You are logged in as ------------------->: adamb You are on host------------------------->: hpux01 PROGRESS is installed in---------------->: /u10/dlc73 You are using this promsgs file--------->: /u10/dlc73/promsgs You are using this protermcap file------>: /u10/dlc73/protermcap You are using this configuration file--->: /u10/dlc73/progress.cfg Database Name--------------------------->: test Database Host--------------------------->: hpux01 Database directory---------------------->: /u3/users/adamb Where the AI file get backedup locally-->: /u3/users/adamb/backup_ai The host where the swai backup db lives->: hpux02 The remote AI file directory------------>: /u3/users/adamb/backup_ai Remote database directory--------------->: /u3/users/adamb Local database backup directory--------->: /u3/users/adamb/backup Number of APWs for the database--------->: 1 If these values are correct you can start testing and moving other programs into $SCRIPTS/live for production use. Generally the only change you will need to make to a script is to the value of $SCRIPTS and in most cases the program will work if $SCRIPTS is set already. There are some PROGRESS programs assosciated with some functions that may need a few changes to work properly but again they are mostly filename changes that are easily found with any editors search function looking for "scripts".