|
|
Shadowing System Databanks
The system databanks (SYSDB, TRANSDB, LOGDB, and SQLDB) require special handling in some situations. If a problem occurs with these databanks or their shadows, the only permitted login is SYSADM logging into the UTIL program. The UTIL program will then recognize the problem and help you correct it.
System databanks are handled in the same way as other databanks, with the following exceptions:
- If there is a problem with SYSDB, TRANSDB, SQLDB or LOGDB, new users cannot login. Users already active will receive an error message when attempting operations that depend on the affected system databank, while other operations continue to work. The error state is held until Mimer SQL is stopped and the error is corrected.
- If there is a problem with a shadow of SYSDB, TRANSDB or LOGDB, new users cannot login until the shadow is dropped or suspended, described in If a Shadow for SYSDB, TRANSDB or LOGDB Is Not Accessible.
- No users can be connected while a shadow for SYSDB, TRANSDB, or LOGDB is created, altered or dropped.
SYSDB
Because the SYSDB databank holds all the data dictionary information about your database, protecting it with shadowing and/or backups is essential.
Otherwise, the whole database will be unreachable if SYSDB is lost.
Transform a SYSDB Shadow to a Master
If SYSDB is lost or corrupt, any existing shadow of the master SYSDB can be altered to become the master in order to allow Mimer SQL to start again.
The SYSDB shadow file should be renamed and/or moved to the location where the master SYSDB was. Then the UTIL is started and login is performed as SYSADM. Enter the name of the shadow to be transformed into the master, and exit.
M I M E R / U T I L Username: SYSADM Password: MIMER/DB warning -18013 in function CONNECT MIMER/DB started from SYSDB shadow. Transform SYSDB shadow to master with UTIL, or restart system from master SYSDB -- Transform shadow -- DATABANK SHADOW OFFLINE FILE ======================================== SYSDBN sysdb82_s --- One shadow found Name of shadow to transform (<CR> = skip): sysdb_s Shadow SYSDB_S transformed to masterIf a the disk where the SYSDB file is located gets inaccessible, it may be more suitable to redefine the database home directory (to point out the SYSDB shadow) instead of restoring the original directory structure.
Note: In this case the ALTER DATABANK statement must be used for all databanks explicitly defined to be located on the halted disk, i.e. with an absolute file specification in the data dictionary.
Restore SYSDB
If SYSDB is lost and no shadows exist, a backup copy of SYSDB can be restored to allow Mimer SQL to start again, an example of how to do this is given in Backup and Restore.
TRANSDB
Shadowing of TRANSDB assures that you can bring your database up-to-date if your ordinary TRANSDB is lost or damaged.
Transform a TRANSDB Shadow to a Master
If TRANSDB is lost or corrupt, an existing shadow of TRANSDB can be transformed to the master.
Start the UTIL program and login as SYSADM. A message is displayed saying that TRANSDB cannot be opened, and a shadow must be transformed to the master, this is similar to the example in SYSDB.
If there are uncompleted transactions they will be completed, as if the "original" TRANSDB was still there.
LOGDB
If some databanks are not shadowed but backup copies of the databanks exist, then a shadow of LOGDB is useful if both an unshadowed databank and the LOGDB master are lost or corrupted.
Transform a LOGDB Shadow to a Master
If LOGDB is lost or corrupt, an existing shadow of LOGDB can be transformed to the master.
Start the UTIL program and login as SYSADM. A message is displayed saying that LOGDB cannot be opened, and a shadow must be transformed to the master, this is similar to the example in SYSDB.
If there are transactions not yet written to the log, this will be done automatically.
SQLDB
Shadowing of SQLDB is not allowed because it only contains temporary data.
However, SQLDB is required when a user logs on to Mimer SQL. If SQLDB is corrupt or lost, it must be recreated by logging on to the UTIL program as SYSADM (this automatically recreates SQLDB if the databank is not found).
If a Shadow for SYSDB, TRANSDB or LOGDB Is Not Accessible
If a shadow for SYSDB, TRANSDB or LOGDB is not accessible, SYSADM should login to the UTIL program. An error message is given followed by the option to drop the shadow or set it offline. If the shadow is corrupt or missing, it should be dropped. If it is only temporarily unavailable it may be enough to set it offline for a short period of time.
M I M E R / U T I L Username: SYSADM Password: MIMER/DB fatal error -16142 in function CONNECT Cannot open databank LOGDB_S, file logdb_s not found Inaccessible shadow encountered. DROP or SET OFFLINE? (D/S): D -- Drop shadow -- Shadow LOGDB_S dropped
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|