next up previous contents
Next: The SNOMAN SDB Interface Up: SNODB User Interfaces Previous: Adding a New Bank

Making a Local Test Database

  Individuals who submit database updates are required to check them locally before submission. In some cases, several iterations of this procedure at the local site may be needed. SNODB has anticipated this requirement/need by allowing users to set up easily a local test version of all or part(s) of the database. A test database will normally be configured such that one of its files-the one with the data under test-is copied from its official location to the test location and placed under local user control. The remaining database files are accessed from their official location in readonly mode.

The following series of steps should be followed in order to set up a test database.

1.
Copy over all the files in the official $\sim$/3_06_02 directory to your own private area, i.e., my_area/cdsno/3_06_02. All the following instructions assume that you are editing the files in this area. (It is assumed that the platform on which the official database is running is the same as the platform on which you wish to run the test database. If not, you need to set up the entire database from scratch.)

2.
Set the following environment variables:

3.
Edit the file $\sim$3_06_02/scripts/snodb.config and make the following changes:

4.
Insure that the disk area chosen for the test database files exists and is appropriate. This area is specified in $\sim$3_06_02/scripts/snodb.config. If the area does not exist, run $\sim$3_06_02/scripts/snodb.perl -dir. If you wish to change the area, edit snodb.config, changing the line
"test dbase file dir" , "dbst_dir"
with the new directory instead of dbst_dir and then run snodb.perl -dir.

5.
Select the particular database files to place under local control by modifying
$\sim$3_06_02/scripts/snodb.config. Place a list of 2 character database abbreviations, e.g., xx and yy, separated from one another by a single space, at the appropriate line as shown:
"dbase files to test" , "xx yy"
The actual database filenames corresponding to the abbreviations like xx and yy are found in either $CDSERV/hepdb.names or in $\sim$/3_06_02/scripts/snodb_lib/init.pl.

6.
Set the $CDSERV environment variable to point to the directory where you wish to place the new hepdb.names file which you will create in the next few steps. This can be any directory where you have write permission. A recommended location is my_area/cdsno.

7.
Set the default directory to $CDSERV and create a new hepdb.names file by running $\sim$3_06_02/scripts/snodb.perl -names

If you are adding a completely new file (as opposed to updating a bank in an existing database file, or adding a new bank or directory to an existing database file) the you must edit the file
my_area/cdsno/3_06_02/scripts/snodb_lib/customize_hepdb_names.pl. In this file, you must:

8.
Start the server by issuing the command $\sim$3_06_02/scripts/snodb.perl -server

9.
Create $\sim$/3_06_02/dbs_tools_f/sndirs.dat as described in in Section 8.1 for your new banks and/or directories. The sndirs.dat file should reside in your personal area.

10.
Run $\sim$3_06_02/scripts/snodb.perl -build_test which will copy over the relevant database files from the official directory and then read in the sndirs.dat file to create new directory structures and bank aliases in the test database files if requested.


next up previous contents
Next: The SNOMAN SDB Interface Up: SNODB User Interfaces Previous: Adding a New Bank
SNOMAN Account
2/14/1998