5 # Ingres does not come with a utility to rename a database, so we do
6 # it this way. First, rename the directory containing the datafiles.
7 # Then run the program to restore after a system crash. It will cause
8 # the dbdb directory to match where the files are, renaming the
11 if (test $# != 2) then
12 echo Usage: $0 oldname newname
18 INGRES=/usr/rtingres/data/default
20 if (test ! -d $INGRES/$OLDNAME) then
21 echo Database $OLDNAME does not exist!
25 if (test -r $INGRES/$NEWNAME) then
26 echo Database $NEWNAME already exists!
30 if (mv $INGRES/$OLDNAME $INGRES/$NEWNAME) then
33 echo Unable to move database
37 echo | /usr/rtingres/bin/finddbs -r