Versant: add root pages

How to add root pages to a Versant instance

There is no rollback procedure, because even if the commands fail, Versant will remain in its original state (we are only adding root pages).

Check the DBID and the number of root pages:
dbtool -AT -info -rootpages $DB
Put Versant in 'Unstartable mode':
dbinfo -0 $DB
Stop Versant:
stopdb -f $DB
Verify that Versant has stopped:
ps -ef | grep obe | grep -v grep
Remove any shared memory that may be allocated:
ipcs -am | grep "$USER" | awk '{if ($6 == 0) print $2}' | xargs -l ipcrm -m
Change the DBID:
setdbid <n> $DB
In this case <n> should be incremented by 1 from the DBID verified by the command:
dbtool -AT -info -rootpages $DB
If the DBID in the dbtool command is 1, then the new <n> should be 2 and so forth.

Put Versant in 'multi-user' mode:
dbinfo -m $DB
Restart Versant:
startdb $DB
Check the new DBID and root pages:
dbtool -AT -info -rootpages $DB