Altering Databank Locations
User databanks may be relocated by moving the physical file using operating system commands and then changing the file location stored in the data dictionary by using the ALTER DATABANK statement to specify the new file specification, see the Mimer SQL Reference Manual for the statement syntax.
The ALTER DATABANK statement may only be issued by the owner of the databank.
- Disconnect the databank from the system.SQL> SET DATABANK databank_name OFFLINE;
- Move or copy/delete the databank file to its new location.
- Alter the databank file name in the data dictionary and reconnect the databank to the system.SQL> ALTER DATABANK databank_name SET FILE Žnew_filenameŽ; SQL> SET DATABANK databank_name ONLINE PRESERVE LOG;
Facilities for changing the file specifications stored in the data dictionary for the system databanks, other than SYSDB, are provided by the BSQL program when a system databank is inaccessible, see Re-creating TRANSDB, LOGDB and SQLDB.
SYSDB must always be located in the home directory for the database.
The location of a databank cannot be altered while the database server is accessing it or while it is being accessed in single-user mode.
Note: You cannot move databanks between databases by copying the databank file and using the facilities to alter the databank location recorded in the data dictionary. You must use the LOAD command. See Loading and Unloading Data and Definitions.
UNIX: Databases on UNIX platforms may be set up with a directory search path instead of a single home directory, see Locating Databank Files.
A databank created without specifying the directory in the file specification may be moved between any of the directories in the search path list without the need to alter anything in the data dictionary. Before being moved, the databank should be set offline to ensure that the file is not locked by the database server.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40