Next: Installation Up: SNODB User Interfaces Previous: Adding a New

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 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 /3_06_05 directory to your own private area, i.e., my_area/cdsno/3_06_05. 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 $SNODB_ROOT/3_06_05/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 $SNODB_ROOT/3_06_05/scripts/snodb.config. If the area does not exist, run $SNODB_ROOT/3_06_05/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
    $SNODB_ROOT/3_06_05/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 can be found in $CDSERV/hepdb.names, $SNODB_ROOT//3_06_05/dbs_tools_f/sndirs-full.dat, or $SNODB_ROOT//3_06_05/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 $SNODB_ROOT/3_06_05/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) you must edit the file
    my_area/cdsno/3_06_05/scripts/snodb_lib/customize_hepdb_names.pl. In this file, you must:

  8. Start the server by issuing the command $SNODB_ROOT/3_06_05/scripts/snodb.perl -server

  9. Create $SNODB_ROOT//3_06_05/dbs_tools_f/sndirs.dat as described in in Section 8.1 if you have any new banks and/or directories. The sndirs.dat file should reside in your personal area.

  10. Run $SNODB_ROOT/3_06_05/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.

  11. When $CDSERV is set as above, updates you wish to test (e.g., via sdb_input_titles) will be applied to your own copy of the appropriate .dbs file(s). You may then run your test SNOMAN job (again with $CDSERV set as above) to analyze the update(s).



Next: Installation Up: SNODB User Interfaces Previous: Adding a New


cdsno@higgs.hep.upenn.edu
Mon Aug 10 17:56:28 EDT 1998