|
|
Shadowing System Databanks
The system databanks (
SYSDB,TRANSDB,LOGDB, andSQLDB) require special handling in some situations.If a problem occurs with these databanks or their shadows, the only permitted login is
SYSADMlogging into the BSQL program. The BSQL 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 an error is encountered on a user databank, automatic shadowing fail-over takes place. However, if there is a problem with
SYSDB,TRANSDB,SQLDBorLOGDB, 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
SYSDB,TRANSDBorLOGDBshadows, new users cannot login until the faulty shadow is dropped or suspended, see If a Shadow for SYSDB, TRANSDB or LOGDB Is Not Accessible.- No users can be connected while a shadow for
SYSDB,TRANSDB, orLOGDBis being created, altered or dropped.- You cannot create a shadow for
SQLDBas it is aTEMPORARYdatabank.Transforming a SYSDB Shadow to a Master
If
SYSDBis lost or corrupt, any existingSYSDBshadow can be altered to become the master in order to allow Mimer SQL to start again.The
SYSDBshadow file should be renamed and/or moved to the location where the masterSYSDBwas. Then the BSQL is started and login is performed asSYSADM. Enter the name of the shadow to be transformed into the master, and exit.Example
Mimer SQL command line utility, version 9.3.7 Username: SYSADM Password: MIMER/DB warning -18013 in function CONNECT MIMER/DB started from SYSDB shadow. Transform SYSDB shadow to master with BSQL, or restart system from master SYSDB -- Transform shadow -- DATABANK SHADOW OFFLINE FILE ======================================== SYSDB SYSSH N SYSDB_S --- One shadow found Name of shadow to transform (<CR> = skip): sysdb_s Shadow SYSSH transformed to masterIf the disk where
SYSDBis located becomes inaccessible, it may be more suitable to redefine the database home directory (to point out theSYSDBshadow) 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.
Restoring SYSDB
If
SYSDBis lost and no shadows exist, a backup copy ofSYSDBcan be restored to allow Mimer SQL to start again, an example of how to do this is given in Backing-up and Restoring Data.TRANSDB and Shadowing
Shadowing
TRANSDBassures that you can bring your database up-to-date if theTRANSDBmaster is lost or damaged.Transforming a TRANSDB Shadow to a Master
Start the BSQL program and login as
SYSADM. A message is displayed saying thatTRANSDBcannot be opened, and a shadow must be transformed to the master, this is similar to the example in Transforming a SYSDB Shadow to a Master.If there are uncompleted transactions they will be completed, as if the original
TRANSDBwas still functioning.LOGDB and Shadowing
If some databanks are not shadowed but backup copies of the databanks exist, then a shadow of
LOGDBis useful sinceLOGDB, in this case, is even more important from a restore perspective.Transforming a LOGDB Shadow to a Master
Start the BSQL program and login as
SYSADM. A message is displayed saying thatLOGDBcannot be opened, and a shadow must be transformed to the master, this is similar to the example in Transforming a SYSDB Shadow to a Master.If there are transactions not yet written to the log, they will be written automatically.
SQLDB and Shadowing
Shadowing
SQLDBis not necessary becauseSQLDBonly contains temporary data.However,
SQLDBis required when a user logs on to Mimer SQL. IfSQLDBis corrupt or lost, you must recreate it by logging on to the BSQL program asSYSADM. This automatically recreatesSQLDBif the databank is not found.If a Shadow for SYSDB, TRANSDB or LOGDB Is Not Accessible
If a shadow for
SYSDB,TRANSDBorLOGDBis not accessible,SYSADMshould login to the BSQL 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, you should drop it. For example:
Mimer SQL command line utility, version 9.3.7 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 droppedIf the shadow is only temporarily unavailable, it may be enough to set it offline for a short period of time.
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|