Im Folgenden sehen Sie eine Auflistung der Kommandozeilenbefehle für die Versant Datenbank.

Kommandozeilenbefehle werden in einer DOS-Box eingeben. In dieser DOS-Box wird auch das Ergebnis ausgegeben, soweit dieses von dem entsprechenden Befehl vorgesehen ist.

Die Syntax bei einem Kommandozeilenbefehl für die Versant Datenbank kann dabei sehr unterschiedlich sein.

In der Regel setzt sich diese aus dem Befehl selbst, den dazugehörigen Optionen und sehr oft auch dem Namen der Datenbank, für den dieser Befehl ausgeführt werden soll, zusammen.

addvol parameters [options] <dbname>
parameters:
-n volName logical name for volume
-p volPath path of volume device/file
options:
-s volSize volume size, default to 128M
e extSize extent size, default to use backend profile
-i pre-allocate and initialize volume
-noprint pre-allocate and initialize the database
dbname: database name
Beschreibung: Erhöht die Speicherkapazität, durch das Erstellen und Hinzufügen eines Volumes zu der Datenbank.
createdb [options] <dbname>
options:
-i pre-allocate and initialize the database
-il pre-initialize the physical and logical logs to logvolma
xsize
-noprint suppress display messages
dbname: database name
Beschreibung: Erstellt, formatiert und initialisiert eine neue Datenbank mit dem Namen dbname. Diese wird entweder zu der bereits existierenden Datenbank hinzugefügt oder startet ein neues Datenbanksystem.
dbid [options] <dbname>
options:
-N Create an osc-dbid file. <dbname> is not specified
-c Create an entry in osc-dbid file for database <dbname>
-C <dbid> Create an entry in osc-dbid file for database <dbname> and database id as <dbid>
-t <type> Specify the type of database (group or personal) Must be used with -c or -C options. Default database type is group.
-d Remove the database <dbname> entry from the osc-dbid file
-r Print the database id of the database <dbname>
-noprint Suppress display messages
dbname: database name
type: database type
1: personal database
2: group database
Beschreibung: Verwaltet die osc-dbid, die Datenbank Systemidentifikations Datei. Die osc Datei speichert Pfade und Namen von allen Datenbanken in einer gesonderten Datenbank ab.
dbinfo <options> <dbname>
options:
[ -m | -0 | -1 | -d ]
-m set multi-user mode
-O set unstartable mode
-l set DBA-only single-connection mode
-d set DBA-only multi-connection mode
-p print existing database mode
-c create a new lock file
-r set read-only mode
dbname: database name
Beschreibung: Ermittelt den aktuellen Modus der Datenbank, spezifiziert als database_name. Dieser Befehl kann nur vom Datenbankadministraotr (DBA) ausgeführt werden.
dblist [options]
options:
-all list all db in the system (default)
-owner owner list db owned by owner
-d dbName list only the named database
-dir list all databases and empty database directories
-noprint suppress display messages
Beschreibung: Listet mit Hilfe der osc-dbid, Datenbank Systemidentifizierungs Datei, alle Datenbanken in dem System auf.
dbtool [ -offline | -nosession ] <module> [options] <dbname>
where module is one of:
-AT AT table
-class class
-schevol schema evolution
-cluster class clustering
-index index
-object object
-space free space
-volume database volume
-partition partition
-trans transaction
-rep replication related
-event event
-locks locks
-sys overall database system
-trace tracing
-dbalog dba logging
-offline Stop database and go into single connection mode
-nosession print the information without doing a beginsession
dbname: database name
NOTE:
To see a detailed listing of options for each of the above modules type "dbtool <module>".
To see a short listing of options available for all modules as well as their usage, type "dbtool -help". For a detailed listing type "dbtool -help -long".
For the options, it is not necessary to specify the full flag as long as enough is specified to be unambiguous.
In case of the "-sys" module, you can directly specify the options and skip the "-sys" flag. The options will implicitly be taken to be a part of the "-sys" module in case the module is not specified. e.g "dbtool -check <dbname>" is the same as "dbtool -sys -check <dbname>"
Beschreibung: Mit dem Dbtool ist es möglich verschiedene Informationen über die Datenbank zu erhalten.
dbuser <command> [options] <dbname>
command:
-list list database user access list (default)
add user to database access list
-add '-n' or '-P' options required , '-passwd', '-role DBA' options maybe specified
-delete delete user from access list
'-n' or '-P' options required
-chpasswd change the password for an existing user
'-n' options required '-opasswd' and '-passwd' options may be specified
options:
-n name user name
-passwd password password
-partition partition
-opasswd old-password old password
-P public access
-m r | rw access mode
-noprint suppress display messages
-role DBA give the user DBA rights
dbname: database name
Beschreibung: Mit dem Befehlt Dbuser kann man Passwörter hinzufügen, entfernen oder ändern oder aber alle Benutzer einer Datenbank aufzulisten. Hier kann auch das Passwort des DBAs geändert werden.
dropinst [-options....] class1 class2 ...
options:
-D db database: use database db (or use O_DBNAME environment)
-n no: make no changes
-y yes: make any changes
-i interactive (default): ask yes or no (stdin must be tty)
-u user: run as this DB user
-p password: enter password for the DB user entered in -u
Beschreibung: Löscht alle Instanzen von einer oder mehreren bestimmten Kategorien und ihren Unterkategorien aus einer bestimmten Datenbank, ohne das Datenbankschema zu verändern.
makedb [options] <dbname>
[ -g | -p ]
-g group database
-p personal database
-owner user make user as owner of database directory
-cpprofile db copy profiles from the specified db directory
-nofeprofile do not create front-end profile
-logging turn logging on
-sglatch turn multi_latch off
-noprint suppress display messages
-promptpasswd prompt for DBA's password
-beprofile filepath copy server profile file from specified location
-feprofile filepath copy application profile file from specified location
-feprofile and -nofeprofile cannot be specified together
-feprofile and -beprofile cannot be used with -cpprofile
dbname: database name
Beschreibung: Erstellt ein Datenbankverzeichnis, genau wie die option in den Optionsparametern und erstellt eine Datenbank Unterstützungsdatei, sofern keine vorhanden ist.
oscp [options]
options:
-d database path
-i environment information
-l product version number with patch
-n dbid node name
-o osc-dbid path
-p Versant runtime path
-r Versant root path
-v product version number
-b ODBMS and cxx patch information
Beschreibung: Informationen zu Ihrer Versantumgebung, für den Release, den Sie beutzen.
removedb [options] <dbname>
options:
-f force removing database
-rmdir remove database directory
-noprint suppress display messages
dbname: database name
Beschreibung: Stopp die Datenbank, wenn diese noch läuft und löscht alle Volumes der Datenbank dbname. Zusätzlich wird die Datenbank aus der osc-dbid Datei gelöscht.
reorgdb options <dbname>
options:
-noprint suppress display messages
dbname: database name
Beschreibung: Verschiebt die Daten auf der Datenbank, und ordnet diese neu an, um Lücken zu schließen. Ähnlich wie bei einer Defragmentierung.
startdb <dbname>
dbname: database name
Beschreibung: Startet die Datenbank dbname. Bei einer Remoteverbindung lautet der Befehl database@node.
stopdb [options] <dbname>
options:
[ -f | -s | -st ]
-f force killing all active transactions
-s wait for update RPCs to be done
-st wait for all active transactions to be done
-noprint suppress display messages
dbname: database name
Beschreibung: Stoppt die Datenbank.
setdbid [options] &&dbid> <dbname>
parameters:
-noprint suppress display messages
dbid: new dbid number
dbname: name of the database
StartAllDBs <options>
parameters:
-all start all databases
-local only local databases
-d <dbname> start only database <dbname>
-s silent mode
dbname: name of the database
Beschreibung: Startet alle Datenbanken.
stopalldbs <options>
options:
-all stop all databases
-local only local databases
-f stop database(s) in use, too
-d <dbname> Stop only database <dbname>
-s silent mode
Beschreibung: Stoppt alle Datenbanken.
vbackup [options] command
where options are one or more of:
-level <level>
-device <filename>
-position <position>
-capacity <capacity>
-blocking <blocking>
-comment <comment>
-rollforward
-startsync
-aggression <aggression>
-script <script>
and command is one of:
-backup <database-names>
-restore { <database-name> [-rename <new-database-name> [-overwrite]] | [-resume] } ...
-off <database-names>
-log <database-names>
-info <database-names>
-list [-getbeprofile [-odir <path-to-save-profile>]]
Beschreibung: Verwaltet die Sicherungen, Wiederherstellungen und noch kommende, archivierte Operationen.
vcopydb [options] <dbname> <replica-dbname>
options:
-nolock ignore locks in source db
-i pre-allocate and initialize the database
-noprint suppress display messages
-nocreate copy to existing database
-threads N fork N threads for copying
-batchsize M copy M objects per transaction (default = 1000)
-progress report overall copy progress on the console
dbname: name of database to replicate
replica-dbname: database name for replica -nocreate and -i cannot be used together
-nocreate and -i cannot be used together
Beschreibung: Kopiert alle Objekte und Kategorien von einer Datenbank in eine andere.