NAME
dbdescriptor - Datascope database descriptor files
DESCRIPTION
Datascope databases typically have a descriptor file, which
provides some of the important parameters about the database.
In particular, a descriptor file specifies the schema used
for the database, and the possible path names for tables of the database.
There are two formats for the descriptor file: the original format
with two lines, and a newer parameter file format which may contain
information about locking and id servers.
Original Descriptor File
The original descriptor file has two lines. The first line specifies
the schema, the second the database path.
-
Schema
The first line typically names a single schema, which is found
either in the same directory, or in the central
directory $ANTELOPE/data/schemas.
In Antelope releases up to and including 5.2,
the schema line could also consist of a list of schemas, with the
names separated by colons. This usage is no longer permitted.
However, similar capabilities
are possible using schema extension directories and/or the SCHEMA_DIR environment variable.
-
Database Path
The second line specifies a path along which the individual files
corresponding to tables may be found. This path is a colon separated
list of directories, with (optionally) different base names specified
between curly brackets:
dir1/:dir2/{name2}:dir3/{name3}
New Parameter file format
A parameter file descriptor file should begin with a pound sign (#) in
the first column of the first line, to distinguish it from the original
format. A paramater file format descriptor file may contain the same information
as the original format, but may also contain information about any locking
mechanism to be used for this database (see
DBLOCKS(5)), and any id server
(see
DBIDSERVER(5)). The following keywords may be present in this file:
-
schema
The value for schema corresponds to the first line in the original parameter file,
and must be a single schema name; in Antelope releases up to and including 5.2,
a list of schemas separated by colons were accepted. However, similar capabilities
are possible using schema extension directories and/or the SCHEMA_DIR environment variable.
-
dbpath
Similarly, the value for dbpath corresponds to the second line in the original
parameter file.
-
dblocks
The value of the dblocks parameter corresponds to the possible values for
the environment variable DBLOCKS, which it overrides.
If dblocks is not in the parameter file, then the environment variable is used.
Otherwise the value of dblocks from the parameter file is used to set the locking
strategy. If it is nfs, then the (slower) nfs strategy is used. If it is none,
no locking is set. Any other value (including no value) causes the local locking
strategy (useful only on locally mounted disks) is used.
-
dbidserver
When the nfs locking strategy is used, an id server must be specified. This is
a hostname and optionally a port number. The id server, dbids(1), must be
started independently.
EXAMPLE
Original descriptor file
For example, a database file might look like:
% cat 1987177
css3.0
/slick3/data/{nrdc}:/wfdisc/nrdc/{master}
%
This database combines the css3.0 and lpevt schemas.
Its tables may either be found
-
1)
in the same directory as the database file, with a base
name of "1987177", or
-
2)
in /slick3/data, with a base name of
"nrdc", or
-
3)
in /wfdisc/nrdc, with a base name of "master"
Only the first table found is used. So if there's no file 1987177.wfdisc,
but a file /slick3/data/nrdc.wfdisc and a file
/wfdisc/nrdc/master.wfdisc, the file /slick3/data/nrdc.wfdisc
is used as the wfdisc table.
New Parameter file descriptor file
The new descriptor file format allows specifying the
setting for dblocks and dbidserver, in addition to the
schema and dbpath.
% cat newdescriptor
# This is a descriptor file
schema css3.0
dbpath /slick3/data/{nrdc}:/wfdisc/nrdc/{master}
dblocks nfs
dbidserver castle
When switching to using a central idserver, it's important
to initially synchronize ids with the server, using dbfixids(1).
SEE ALSO
dbintro(3)
dbschema(5)
dbfixids(1)
AUTHOR
Daniel Quinlan