DBADMIN C-1
Copyright (C) 1994-95 Conetic Software Systems, Inc.
All names, products, and services mentioned are the trademarks of their respective organizations.
NAME
dbadmin - administer database catalog
SYNOPSIS
dbadmin -a [-vx] [-C comment ] [ -L logfile ] dbname homedir
dbadmin -c [-vx] [-C comment ] [ -L logfile ] [ options ] dbname directory
dbadmin -d [-vx] dbname
dbadmin -f [-v] dbname
dbadmin -h [-v] dbname
dbadmin -l [-v] dbname [printfields]
dbadmin -r [-v] dbname [printfields]
dbadmin -u [-vx] [-C comment ] [-L logfile ] [-H homedir ] dbname
DESCRIPTION
Dbadmin maintains the database catalog. Each invocation of dbadmin
either adds, updates or deletes a database entry from the catalog, or
provides catalog information on existing entries.
One of the following flags must be specified to indicate the operation
to be performed:
-a Adds an entry for dbname to the database catalog. dbname gives the
name of the database. It can be up to 32 characters long and should
not contain blanks. An entry in the database catalog cannot already
exist for dbname. Homedir names the home directory for the database.
This directory must be an absolute pathname that exists prior to
performing this operation.
The optional flags -C and -L are available to initialize catalog
fields. The -C flag initializes the description catalog field. If
it is omitted, the description is set to null. The -L flag names
the optional logfile that is stored in the database catalog. If it
is omitted, the logfile is set to null.
-c Creates the database dbname. An entry in the database catalog
cannot already exist for dbname. In addition to adding an entry to
the database catalog, dbadmin also creates the home directory for
the database in directory. Directory names the absolute pathname of
a directory in which the new database is to be created. Obviously,
in order for this to work, the named directory must already exist.
Once created, dbadmin writes the home directory generated for dbname
on standard output.
The database name dbname can be up to 32 characters long and should
not contain blanks. If the name is too long for a directory entry,
a shorter name is generated. If a file or directory already exists
in the named directory, a new unique name is configured.
The flags -C and -L are available to initialize catalog fields.
-d Deletes the database entry for dbname from the database catalog.
This does not remove the actual database, only the database catalog
entry. Before a database entry can be removed, all logical RMSfiles,
reportfiles and formfiles for that database must be removed.
With the -d flag, only users that can remove the home directory of
dbname can remove the database entry from the database catalog.
-f Displays all logical RMSfiles currently defined for the database
dbname. With the -v flag, the descriptions for each logical RMSfile
is displayed. In addition, titles are printed showing the catalog
fields displayed. With the -v flag, omitted, just the logical
RMSfile names are printed.
-h Displays on standard output the absolute pathname of the home
directory for the database dbname. If the named database is not
defined, only a new line character is printed.
-l Displays all databases currently defined in the database catalog.
Including the -v flag, titles for all selected printfields are
displayed. With no printfields selected,the default listing is the
description of each database in addition to its' name. Print-fields
selects the catalog field information displayed for each database.
The print-fields available for the database are dbname, home, logfile,
and desc.
-r Displays the catalog field information for a database entry.
Including the -v flag, titles on all selected printfields are
displayed. With no printfields selected, the default listing is
the description of the database dbname along with its' name.
Printfields selects the catalog field information displayed for a
database. The printfields available for a database are dbname, home,
logfile, and desc.
-u Updates the catalog entry for the defined database dbname. At least
one
of the optional flags (-C, -H, or -L) must be supplied when updating a
database entry.
The meanings of the optional flags are:
-v Displays progress information on standard output.
-x Displays on standard output the commands run by dbadmin.
-C comment
Supplies the description of dbname that is recorded with the
database catalog entry. This description is not needed or used by
the system. The argument comment is required with the -C flag and
must be quoted if embedded with blanks, tabs or newlines. If this
flag is omitted when adding or creating a database, the description
is set to null. If this flag is omitted when the update (-u) flag
is specified, the description for the database is unchanged.
-H homedir
Names the home directory pathname for the database dbname. This
option is used only with the update (-u) flag. Homedir must be
specified as an absolute pathname (e.q. /usr/cbase/demo and must
exist before attempting to change the home directory for dbname.
When determining the pathname of a logical file, if the logical
file's pathname is a relative pathname, the home directory is
prepended to the logical file's pathname.
-L filename
Names the pathname for a file used in recording changes made to any
logical RMSfile defined for dbname. When adding or updating a
database entry, the file used for logging must exist prior to running
this command. When creating a database with the -c flag, the logfile
is created. The filename can be specified as an absolute pathname
(e.q. /usr/cbase/demo/logfile), or a pathname relative to the home
directory of the database.
When the named database is opened, or a logical file within the
database is opened for writing, the specified logfile is opened. If
no log file is given, no transaction logging is done for the database.
SEE ALSO
dblist(C-1), dbfile(C-1), dbhome(C-1), dbadd(C-1), dbcreate(C-1),
dbremove(C-1), dbrm(C-1), dbupd(C-1).
NOTES
Dbadmin performs the operations of dblist(C-1), dbhome(C-1), dbadd(C-1),
dbcreate(C-1) and dbremove(C-1). The binary program for dbadmin is
copied to each of the above programs for backwards compatibility. In
addition, for all programs copied from the dbadmin program, each one has a
corresponding resource file copied from the dbadmin resource file (/usr/
cbase/lib/cbase/resource/dbadmin.r).