Next: Installation
Up: SNODB User Interfaces
Previous: Adding a New
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.
- Copy over all the files in the official
/3_06_04
directory to your own private area, i.e., my_area/cdsno/3_06_04. 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.)
- Set the following environment variables:
- $SNODB_ROOT to my_area/cdsno
- $SNODB_VER to 3_06_04
- $SNODB_CODE to the official SNOMAN code area
- Edit the file $SNODB_ROOT/3_06_04/scripts/snodb.config and make the following changes:
- Set ``official or test?'' to ``test''
- If you are not in the ``snodbw'' group, which you
can check by typing the unix command groups, change
snodbw to sno. (You should be in the sno group!)
- Set parent_dir to my_area
- Insure that the disk area chosen for the test database files
exists and is appropriate. This area is specified in $SNODB_ROOT/3_06_04/scripts/snodb.config. If the area does not
exist, run $SNODB_ROOT/3_06_04/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.
- Select the particular database files to place under local
control by modifying
$SNODB_ROOT/3_06_04/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 $SNODB_ROOT//3_06_04/scripts/snodb_lib/init.pl.
- 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.
- Set the default directory to $CDSERV and create a new
hepdb.names file by running $SNODB_ROOT/3_06_04/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_04/scripts/snodb_lib/customize_hepdb_names.pl.
In this file, you must:
- Add a new two character abbreviation for your new database file
to the list which is prefaced by :list.
- Add a new database description similar to those existing already.
These descriptions are prefaced by :nick.xx where xx
is the two character database abbreviation.
- Start the server by issuing the command $SNODB_ROOT/3_06_04/scripts/snodb.perl -server
- Create $SNODB_ROOT//3_06_04/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.
- Run $SNODB_ROOT/3_06_04/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.
- 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