Mimer SQL System Management Handbook TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


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.

Example:
  1. Disconnect the databank from the system.
     SQL> SET DATABANK databank_name OFFLINE;
     
    
  2. Move or copy/delete the databank file to its new location.
  3. Alter the databank file name in the data dictionary and reconnect the databank to the system.
     SQL> ALTER DATABANK databank_name INTO Ž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 UTIL program, 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: Databanks cannot be moved between databases by copying the databank file and using the facilities to alter the databank location recorded in the data dictionary. The EXPORT/IMPORT utility must be used for this.

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.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL System Management Handbook TOC PREV NEXT INDEX