Page 1¶
SIBAS II¶
Operator Manual¶
ND-30.009.3 EN
Page 2¶
SIBAS II¶
Operator Manual¶
ND-30.009.3 EN
Page 3¶
NOTICE¶
The information in this document is subject to change without notice. Norsk Data A.S assumes no responsibility for any errors that may appear in this document. Norsk Data A.S assumes no responsibility for the use or reliability of its software on equipment that is not furnished or supported by Norsk Data A.S.
The information described in this document is protected by copyright. It may not be photocopied, reproduced or translated without the prior consent of Norsk Data A.S.
Copyright © 1986 by Norsk Data A.S.
Page 4¶
Norsk Data A.S¶
Denne håndboken er i løsbladssystem for å forenkle oppdatering. Gamle sider kan fjernes og nye sider settes inn på en enkel måte hvis håndboken er revidert.
Løsbladssystemet gjør det også mulig å plassere håndboken i en ringperm (A) for å beskytte den og for å gjøre det lett å slå opp i den. Ringpermer med 4 ringer tilsvarende hullene i håndboken kan bestilles i to bredder, 30 mm og 40 mm. Bruk bestillingsskjema nederst på siden.
Håndboken kan også plasseres i plastomslag (B). Dette omslaget passer bedre for håndbøker på 100 sider eller mindre enn for større håndbøker. Plastomslag kan også bestilles nederst på siden.
A: Ringperm
B: Plastomslag
Vennligst send bestillingen til det lokale ND kontoret eller (i Norge) til:
Norsk Data A.S
Grafisk Senter
Postboks 25, Bogerud
0621 Oslo 6
Bestilling¶
Jeg ønsker å bestille:
- Ringpermer, 30 mm, nkr 20,- pr. stk.
- Ringpermer, 40 mm, nkr 25,- pr. stk.
- Plastomslag, nkr 10,- pr. stk.
| Navn | |
|---|---|
| Firma | |
| Adresse | |
| By |
Page 5¶
PRINTING RECORD¶
| Printing | Notes |
|---|---|
| 02/83 | Version 1 EN |
| 12/84 | Version 2 EN |
| 05/86 | Version 3 EN |
SIBAS-II Operator's Manual
Publ. No. ND-30.009.3 EN
Norsk Data A.S
Graphic Center
P.O. Box 25, Bogerud
0621 Oslo 6, Norway
Page 6¶
Manual Updates¶
Manuals can be updated in two ways, new versions and revisions. New versions consist of a complete new manual which replaces the old manual. New versions incorporate all revisions since the previous version. Revisions consist of one or more single pages to be merged into the manual by the user, each revised page being listed on the new printing record sent out with the revision. The old printing record should be replaced by the new one.
New versions and revisions are announced in the Customer Support Information (CSI) and can be ordered as described below.
The reader’s comments form at the back of this manual can be used both to report errors in the manual and to give an evaluation of the manual. Both detailed and general comments are welcome.
These forms and comments should be sent to:
| Address |
|---|
| Documentation Department |
| Norsk Data A.S |
| P.O. Box 25, Bogerud |
| 0621 Oslo 6, Norway |
Requests for documentation should be sent to the local ND office or (in Norway) to:
| Address |
|---|
| Graphic Center |
| Norsk Data A.S |
| P.O. Box 25, Bogerud |
| 0621 Oslo 6, Norway |
Page 7¶
PREFACE¶
| The Product | This manual is intended to be a practical guide for people who operate the F Version of the SIBAS-II Database Management System. |
| The Reader | Operators who control the daily operation of the database system. |
| Prerequisite Knowledge | You should possess a general knowledge of databases and SINTRAN-III. Further explanation of the concepts, terms and commands used in SIBAS can be found in the SIBAS-II User Manual. |
| Related Manuals | SIBAS-II User Manual (ND-60.127) SINTRAN-III Real Time Guide (ND-60.133) SINTRAN-III System Supervisor (ND-30.003) |
| The Manual | This manual gives only the recommended or standardized ways of carrying out the various procedures which the operator is responsible for. It is not intended to explain the full range of ways of carrying out BACKUP, RECOVERY, etc. |
| What is new in this Version of the Manual? | Most of the examples in this manual are adjusted to reflect the changes in the F version of SIBAS II. |
ND-30.009.03 EN
Page 8¶
I'm sorry, I cannot process the content of the image.
Page 9¶
TABLE OF CONTENTS¶
| Section | Page |
|---|---|
1 CONTROLLING THE DATABASE CONTROL SYSTEM (DBCS)¶
1.1 Starting a Database ........................................ 6
1.2 SIBAS States .............................................. 7
1.3 Stopping the Database: the STOP Command ................... 9
1.4 FORCE-CLOSE: Abnormal Stop in Error Situations ............ 11
1.5 Closing a Database for a Specific Interactive User ........ 12
1.6 Closing the Database for an RT-program, Batch or Mode Job . 14
1.7 Closing the Database for all Users ........................ 15
1.8 SUPER-STOP ................................................ 16
1.9 Aborting SIBAS ............................................ 17
2 BACKUP AND LOGGING¶
2.1 The ROUTINE-LOG (R-LOG) ................................... 22
2.2 The Before-Image-Log (BIM-LOG) and the Checkpoints ........ 23
2.3 Graphic Representation of BACKUP, R-LOG and BIM-LOG ....... 24
2.4 Initiating LOG File (Start Using the R-LOG) ............... 25
2.5 How to Set the RUNFLAG .................................... 26
2.6 Starting a Database Using the R-LOG: An Example ........... 28
2.7 The BIM-LOG ............................................... 30
2.8 Starting a Database Using the BIM-LOG: An Example ......... 31
2.9 The BACKUP Procedure ...................................... 33
2.10 The Database Verification ................................ 34
2.11 Verifying a Database: An Example .......................... 35
2.12 The Database Verification Error Messages .................. 38
2.13 How to take BACKUP Copies ................................. 39
2.14 Resetting the R-LOG ....................................... 40
3 MAINTAINING FILES¶
3.1 Creating the R-LOG file ................................... 47
3.2 Checking File and Realm Sizes ............................. 48
3.3 Changing the Size of the R-LOG ............................ 49
3.4 Changing the Size of the BIM-LOG .......................... 50
3.5 Increasing the Size of a Realm ............................ 51
4 RECOVERY¶
4.1 Recovery with only R-LOG in use: An Example ............... 56
4.2 Recovery Using BIM-LOG and R-LOG .......................... 58
4.3 Recovery with BIM-Log and R-Log: An Example ............... 59
ND-30.009.03 EN
Page 10¶
Appendix¶
| Section | Page |
|---|---|
| 1 SIBAS-SERVICE | 63 |
| 1.1 The SIBAS-SERVICE Commands | 65 |
| 2 SIB2-LOOKLOG USER GUIDE | 72 |
| 2.1 Output Formats | 73 |
| 2.2 Running the SIB2-LOOKLOG | 74 |
| 2.3 The SIB2-LOOKLOG Commands | 75 |
| 2.4 A Session with SIB2-LOOKLOG: An Example | 77 |
| 3 DESCRIPTION OF OUTPUT FROM DATABASE-STATUS | 80 |
| Index | 83 |
ND-30.009.03 EN
Page 11¶
The Role of the Operator¶
What does an operator of SIBAS-II have to do?
| Ensure the availability and smooth running of the database system. | Make sure you have worked out an operations strategy. Use mode files that you know work. |
The operator is responsible for:
- Starting and stopping of SIBAS
- Detecting and analysing errors
- Resolving error situations
- Informing users of special conditions and broadcasting messages
- Maintaining database files and logfiles
BACKUP/Recovery¶
If you are careful and always do a recovery when the machine stops or whenever SIBAS is aborted, you will avoid losing data which cause inconsistent internal structures in the database.
The operator is responsible for:
- Taking BACKUP regularly
- Administering BACKUP copies
- Initiating/resetting logfiles
- Reprocessing logfiles (copy in BACKUP) when recovery is required
Installing and Maintaining SIBAS¶
The operator must:
- Keep up with new versions.
- Look out for Error Reports/patches described in "ND Customer Support Information".
- Perform patches concerning "your" version of SIBAS.
ND-30.009.03 EN
Page 12¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS¶
ND-30.009.03 EN
Page 13¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS¶
Chapter 1: Controlling and Supervising SIBAS¶
- CONTROLLING THE DATABASE CONTROL SYSTEM
- STARTING A DATABASE
- AN EXAMPLE OF THE START AND THE RUN COMMANDS
- STOPPING THE DATABASE
- ABNORMAL STOP IN ERROR SITUATIONS
- CLOSING A DATABASE FOR A SPECIFIC BACKGROUND USER
- CLOSING A DATABASE FOR A SPECIFIC FOREGROUND USER
- CLOSING A DATABASE FOR ALL USERS
- SUPER-STOP
- ABORTING SIBAS
ND-30.009.03 EN
Page 14¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS¶
- Controlling the Database Control System
- Starting a Database
- Example of the Start and the Run Commands
- Stopping the Database
- Abnormal Stop in Error Situations
- Closing a Database for a Specific Background User
- Closing a Database for a Specific Foreground User
- Closing a Database for All Users
- Nurse-Stop
- Aborting SIBAS
ND-30.009.03 EN
Page 15¶
CONTROLLING THE DATABASE CONTROL SYSTEM (DBCS)¶
| What is the DBCS? | An installation (i.e. one ND computer) may have from one to twenty four local DBCS'. The DBCS' are 24 RT programs with the names: SIB2A,..., SIB2X and numbers: 0, 1,..., 23. |
| A DBCS is a SIBAS Process | A DBCS (e.g., SIB2A) can control only one database at a time. A DBCS is also referred to as a SIBAS process. |
| Several users may access a SIBAS database simultaneously | Many users (maximum 60 on ND-100, 188 on ND-500) may access a database simultaneously, and many different databases (maximum 24) may be used at the same time on a single (local) installation. |
| Assign a SIBAS process by using the START command | A database must be assigned to a free DBCS before use. Any free DBCS will do. A database is assigned to a free DBCS using the START command in the SIBAS-SERVICE program. |
| SIBAS-SERVICE is used to control the SIBAS processes | SIBAS-SERVICE is an interactive utility which can make life a bit easier for the SIBAS operator. The program can be used to start/stop SIBAS, supervise logging, get statistics, perform RECOVERY etc. |
| Some SINTRAN commands also control SIBAS processes | Privileged SINTRAN or ND-500-MONITOR commands can be used, in exceptional cases, to control SIBAS processes. |
| SIBAS service is used from the user RT, SYSTEM or the database owner | The operator must enter the user RT, SYSTEM or the database owner in order to carry out the general database control. |
| User RT must be a "Friend" | Note that user RT must have been created as a FRIEND, using the SINTRAN command @CREATE-FRIEND, and been given Read/Write/-Append (RWA) access to the database files (@SET-FRIEND-ACCESS,RT,RWA). If this has not been done, error messages on the error device will result. |
ND-30.009.03 EN
Page 16¶
1.1 Starting a Database¶
A database must be STARTed (i.e. assigned to a free SIBAS process) before any application can use it.
| The START command associates a database to a SIBAS process | A database is associated to one and only one SIBAS process by the START command. The association is ended by the STOP command. Remember that it is of prime importance to STOP the database properly before a machine stop or BACKUP. |
The database is started by using the START command in SIBAS-SERVICE. When you use this command the following points should be kept in mind:
| SIBAS must be READY | SIBAS must be in a READY state for the START command to be given. |
|---|---|
| User RT must be a Friend | The user RT must have been created as FRIEND of the database owner, with RWA access to the database files, prior to the issuing of the START command. Normally, this should be done at once when the database is created. |
| Database must exist | The database files must exist and be closed for the START command to work. |
| Database must be RUNNING | The database must be in RUNNING state before applications can use it. The DBCS is set RUNNING by the RUN command in SIBAS-SERVICE. |
| RUN Command in SIBAS-SERVICE does not open the database | Note that the database is not opened by setting SIBAS in RUNNING state. The database will be physically opened (i.e. all database files opened) when the first application opens it. For this reason the SINTRAN command @LIST-RTOPEN will not list the database files after the RUN command has been given in SIBAS-SERVICE. |
| A Database can only be used when it has been STARTed | A database can only be used when it has been started. After a START users/programs can use the database. |
ND-30.009.03 EN
Page 17¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS
1.2 SIBAS STATES¶
A SIBAS process is always in one of the 5 different states shown in the following diagram:
Actions for the various SIBAS states:
PASSIVE
|
SET-PASSIVE ---------> "GIVE SIBAS SYSTEM NUMBER"
| |
READY <----------------- INITIATE-LOG
| * A box represents
STOP a state.
| * An arrow represents
DBA <----------- an action.
|
RUN RECOVER
| |
PAUSE FINISH |
\ | /
RUNNING RECOVERY
| |
DML CALLS REPROCESS/ROLL BACK
PASSIVE state
When the SIBAS processes are loaded with an RT loader, all the SIBAS processes are in PASSIVE state.
READY state
A SIBAS process is put in the READY state by giving the command @RT SIB2x or by giving the system number when using @SIBAS-SERVICE. The SIBAS process is activated and is waiting to be connected to a database.
DBA state
This is a privileged state where different maintenance calls may be executed while SIBAS process activity is suspended. No user application can access the database in this state.
RUNNING state
In the RUNNING state the different database manipulation calls are executed. The database is set available to all users.
RECOVERY state
This is an exception state where reprocessing and rollback activities are carried out.
ND-30.009.03 EN
Page 18¶
Controlling and Supervising SIBAS¶
An example of the START and RUN commands.¶
@SIBAS-SERVICE
SIBAS II, version F
SIBAS-SERVICE/100, revision 00
Explanation ? N
Status for all SIBAS processes ? Y
You will now get the status of the SIBAS processes on one machine.
The machine name must be defined on your local computer.
Default (carriage return/CR) will list status of SIBAS processes on your local computer.
Data Base Machine name? (*SIBn or CR for local):
Number of SIBAS processes (default=12) ? 6
0 SIB2A : PASSIVE
1 SIB2B-100: RUNNING, OWNER:AEM-US , DATABASE:AEMBASE
2 SIB2C : PASSIVE
3 SIB2D : READY
4 SIB2E-100: RUNNING, OWNER:KILROY , DATABASE:STOCKDB
5 SIB2F : PASSIVE
SIBAS system number: 0
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>START
DATABASE OWNER:MPS-USER
DATABASE NAME: FORDB
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RUN
NEW RUNFLAG? N
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>DATABASE-STATUS
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
ROUTINE-LOG (R-LOG) IS NOT IN USE
| ADDRESS: | TIME: |
| -------------- | --------------------------- |
| PAGE WORD | YEAR-MM-DD HOUR:MIN:SEC BASIC-UNITS |
| CURRENT TIME | 0 0 1986-02-22 16:16:51 (15)|
| DATABASE OPENED| 0 0 0-00-00 00:00:00 (00) |
| DATABASE CLOSED| 0 0 0-00-00 00:00:00 (00) |
| LAST CHECKPOINT| 0 0 0-00-00 00:00:00 (00) |
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 12
DATABASE (MPS-USER)FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT
- EXIT
For a description of this output see Appendix.
ND-30.009.03 EN
Page 19¶
1.3 Stopping the Database: The STOP Command¶
The database must always be stopped before one can take BACKUP or stop the machine. If the machine is stopped while the database is open, the database will be destroyed and a RECOVERY must be done.
| STOP Database when it is in RUNNING state | The database is stopped by giving the STOP command when SIBAS is in RUNNING or DBA state. This stop is "controlled" in the sense that all updated pages and internal SIBAS tables will be written to disk. |
|---|---|
| Database must be CLOSED before it is STOPped | The STOP is successful only when the database is physically closed. To find out if the database is closed give the command DATABASE -STATUS in SIBAS-SERVICE. If it is physically closed, you will get the message "DATABASE ( |
| A STOPped Database is not assigned to a SIBAS process | Note that the database will no longer be assigned to any SIBAS process after a successful STOP command has been executed. The SIBAS process that was used will be freed. |
An example for STOPPING a database is given on the next page >>>>>
Page 20¶
Stopping a Database: An Example¶
@SIBAS-SERVICE
S I B A S I I, version F
SIBAS-SERVICE/100, revision 00
Explanation? N
Status for all SIBAS processes? N
SIBAS system number: 0
SIBAS-SYS-NO: 0, SIBAS STATE: READY
DATABASE-STATUS
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
ROUTINE-LOG (R-LOG) IS NOT IN USE
| ADDRESS | TIME |
|---|---|
| PAGE | |
| ---------- | -------- |
| CURRENT TIME | 0 |
| DATABASE OPENED | 0 |
| DATABASE CLOSED | 0 |
| LAST CHECKPOINT | 0 |
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 476512
DATABASE (MPS-USER) FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
STOP
SIBAS-SYS-NO: 0, SIBAS STATE: READY
EXIT
- EXIT -
ND-30.009.03 EN
Page 21¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS
1.4 FORCE-CLOSE: Abnormal Stop in Error Situations¶
A user must open the database before accessing it, and should always close the database when finished.
| The Database must be Closed if a User Program is Aborted | If the user program stops without closing the database, e.g., if it gets aborted by pressing the escape (ESC) key or s/he simply forgets to close the database, the database should be explicitly closed. The exception is when the database is in error and RECOVERY has to be done. |
| When to use the FORCE-CLOSE Command | The FORCE-CLOSE command in SIBAS-SERVICE can be used to:
- Close the database for all users.
- Close the database for a specific user. |
| FORCE-CLOSE closes Database without changing SIBAS State | The command FORCE-CLOSE closes the database for one or more users, without changing the SIBAS state. |
| How to Identify Users who have Opened the Database | SIBAS must be able to uniquely identify each user/program that has opened a database. SIBAS identifies a program through the program's "userid’s": |
| SIBAS user identification | A combination of machine number (CPU number) and terminal number (input device number) is sent to SIBAS when the database is opened. If an RT program (foreground), batch or mode job is used, then the RT description address is sent rather than the terminal number. SIBAS will then find a free userid and return to the calling program. This userid will from this point on be used to identify the program for SIBAS.
The best method for identifying the corresponding SINTRAN user name is by using the SINTRAN commands @WHO or @TERMINAL-STATUS. The terminal identifications given by these commands indicate which users have opened the database (see next section). |
ND-30.009.03 EN
Page 22¶
1.5 Closing a Database for a Specific Interactive User¶
Let us say that a user was running a program from a terminal (background/interactive). S/he finished but left the database open. You want to close the database for that particular user. When you are logged in as user RT (or SYSTEM), do the following:
Use the DATABASE-STATUS command to identify the user of the database:
@SIBAS-SERVICE:
S I B A S I I, version F
SIBAS-SERVICE, revision 00
Explanation ? N
Status for all SIBAS processes ? N
SIBAS SYSTEM NUMBER: 0
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>DATABASE-STATUS
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
ROUTINE-LOG (R-LOG) IS NOT IN USE
| ADDRESS: PAGE WORD | TIME: YEAR-MM-DD HOUR:MIN:SEC | BASIC-UNITS |
|--------------------|-------------------------------|-------------|
| CURRENT TIME | 0 0 1986-02-22 16:40:31 | (23) |
| DATABASE OPENED | 0 0 1986-02-22 16:40:15 | (00) |
| DATABASE CLOSED | 0 0 1986-02-22 16:40:12 | (8) |
| LAST CHECKPOINT | 0 0 1986-02-22 16:40:16 | (35) |
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 220
DATABASE (MPS-USER) FORDB OPENED BY 1 USERS (1/READ, 0/UPDATE)
| USERID | CPU | DEVICE | UPDATE LOG | CALLS EXECUTED | ACTIVE TRANSACT. | OPEN TIME |
|--------|-----|--------|------------|----------------|------------------|-------------|
| 2 | 5028| 43 I | NO OFF | 9 | 16:40:15 22.02 |
note the DEVICE (terminal no)
of the database user (the 'I'
indicates interactive user)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT
Page 23¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS¶
Identify the user and send mail:¶
@WHO:
52 SNURE-SPRETT
55 SYSTEM
15 OLE-IDOLE
42 PHIL-HACKER
43 PETTER-SMART
SYSTEM
775 BRUCE-SPRINGSTEEN
670 SYSTEM
672 BATCH-RUNNER
674 SYSTEM
- In this example MAIL should be sent to terminal 43 (PETTER-SMART) telling him to close the database; otherwise it will be FORCE CLOSED.
FORCE-CLOSE the database for a specific user:¶
@SIBAS-SERVICE:
S I B A S I I, version F
SIBAS-SERVICE, revision 00
Explanation? N
Status for all SIBAS processes? N
SIBAS SYSTEM NUMBER: 0
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>FORCE-CLOSE
USERID (DECIMAL), OR -1 IF ALL USERS: 2
>>DATABASE-STATUS
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
ROUTINE-LOG (R-LOG) IS NOT IN USE
| ADDRESS: | TIME: |
|-----------------|---------------------------------|
| PAGE | WORD | YEAR-MM-DD | HOUR:MIN:SEC | BASIC-UNITS |
| CURRENT TIME | 0 | 1986-02-22 | 16:44:51 | (23) |
| DATABASE OPENED | 0 | 1986-02-22 | 16:40:15 | (00) |
| DATABASE CLOSED | 0 | 1986-02-22 | 16:44:42 | (8) |
| LAST CHECKPOINT | 0 | 1986-02-22 | 16:44:42 | (35) |
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 245
DATABASE (MPS-USER) FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT
> -EXIT -
ND-30.009.03 EN
Page 24¶
1.6 Closing the Database for an RT-Program, Batch or Mode Job¶
The procedure for closing the database for a foreground user (RT program), batch or mode job is the same as for closing the database for an interactive user. The FORCE-CLOSE command in SIBAS-SERVICE is used. The DEVICE returned from the DATABASE-STATUS command will now be the RT description address (octal) of the RT-program, batch processor or terminal where a mode job is running. 'R' indicates RT-program, 'B' batch job and 'M' a mode job. ('I' is displayed if interactive user).
The SIBAS operator is advised to keep a list of all RT-programs (@LIST-RT-PROGRAMS).
FORCE-CLOSE a Database for an RT, Batch or Mode Job User:
@SIBAS-SERVICE.
S I B A S II, version F
SIBAS-SERVICE, revision 00
Explanation ?
Status for all SIBAS processes ?
SIBAS SYSTEM NUMBER:
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>DATABASE-STATUS.
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
ROUTINE-LOG (R-LOG) IS NOT IN USE
| ADDRESS: | TIME: |
| PAGE | WORD | YEAR-MM-DD | HOUR:MIN:SEC | BASIC-UNITS |
|------|------|-------------|----------------|----------------|
| CURRENT TIME | 0 | 0 | 1986-02-22 | 16:40:31 | (23) |
| DATABASE OPENED | 0 | 0 | 1986-02-22 | 16:40:15 | (00) |
| DATABASE CLOSED | 0 | 0 | 1986-02-22 | 16:40:12 | (8) |
| LAST CHECKPOINT | 0 | 0 | 1986-02-22 | 16:40:16 | (35) |
------------------------------------------------------------------------------
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 220
DATABASE (MPS-USER)FORDB OPENED BY 1 USERS (0/READ, 1/UPDATE)
| USERID | CPU | DEVICE | UPDATE LOG | EXECUTED | TRANSACT. | OPEN TIME |
|--------|------|---------|-----------|---------|----------|-------------|
| 3 | 6558 | 4680 R | YES | OFF | 9 | 16:40:15 22.02 |
[note: DEVICE is RT description address of an RT program (the 'R' indicates an RT program)]
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>FORCE-CLOSE.
USERID (DECIMAL), OR -1 IF ALL USERS:
>EXIT.
- EXIT -
ND-30.009.03 EN
Page 25¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS
1.7 Closing the Database for All Users¶
This command must be used with great care. It could inconvenience SIBAS users unnecessarily, to say the least!
| Send BROADCAST before using FORCE-CLOSE | Before giving the command, send a broadcast to all users telling them that you are going to use the FORCE-CLOSE command and exactly when you will give it. Tell them to terminate their work and close the database as soon as possible. |
|---|---|
| FORCE-CLOSE may cause errors in programs | If you give this command when programs are actively accessing the database, these programs will get error messages and will probably terminate. |
Example of closing the database for all users:
@SIBAS-SERVICE:
--------
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>FORCE-CLOSE -1
>>EXIT
Using the command FORCE-CLOSE with -1 closes the database for all users.
ND-30.009.03 EN
Page 26¶
1.8 SUPER-STOP¶
The effect of this command is to close the database for all users and set SIBAS in the PASSIVE state. The SUPER-STOP is in other words a combination of the FORCE-CLOSE and the STOP commands.
| SUPER-STOP is "controlled" | This stop is "controlled" in the sense that all updated pages in the database will be written to disk. |
|---|---|
| Send MAIL and CLOSE database before using SUPER-STOP | We suggest the following procedure in using this command: |
After you have given the SUPER-STOP, you will be asked: "Force-close for all users?(Y/N)". Answer N (no). If the database is not opened for any users, the SUPER-STOP will be carried out with no problems, as in the example below. If it is opened for any users, you will get the error message: "Illegal to call stops when database is open." You should then use the MAIL system in SINTRAN to broadcast a message telling the users to stop work and close the database. When they have closed the database, you can go back into SIBAS-SERVICE and give the SUPER-STOP command again. This time it will work.
| Do not close the database when users are accessing it | Remember that closing the database while any users are accessing it could be very inconvenient, causing error conditions to arise. |
Example of using SUPER-STOP:
@SIBAS-SERVICE↵
---------
---------
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>SUPER-STOP↵
Force-close for all users?(Y/N): N↵
SIBAS STATE: PASSIVE
->EXIT -
Note that if you get an error message, follow the procedure described above
ND-30.009.03 EN
Page 27¶
SIBAS-II Operator's Manual¶
Controlling and Supervising SIBAS
1.9 Aborting SIBAS¶
The @ABORT SIB2x command (in SINTRAN) will set SIBAS immediately in PASSIVE state without closing the database properly. This command is given in SINTRAN, ie., after the @ (the commercial at, which indicates that you are in SINTRAN). If SIBAS is running on the ND-500, ABORT SIB2x must never be used to abort a SIBAS process. Instead the ND-500-MONITOR command LOGOUT-PROCESS
Use ABORT SIB2x very carefully¶
Command ABORT SIB2x destroys the database. It should only be used in the following circumstances (very seldom):
- When a serious error is discovered and the database must be stopped immediately, ie., when RECOVERY has to be done anyway (refer chapter 5).
- When the database is in error, e.g., all applications hang and it is impossible to continue or to stop SIBAS by using any of the SIBAS-SERVICE commands.
Example: Aborting a SIBAS process on the ND-100 CPU.
| Command | Description |
|---|---|
| @ABORT SIB2A | This sets SIB2A PASSIVE |
| @LIST-RTOPEN,,,, | |
| 101 (MPS-USER)FORDB:DATA | Close the corresponding database files. You will not be able to start the database again if you don't close the files first. |
| 102 (MPS-USER)SYSFILE:DATA | |
| 103 DIABLO;1 | |
| @RTCLOSE 101 | |
| @RTCLOSE 102 |
- Now you have to do RECOVERY before starting the database again.
ND-30.009.03 EN
Page 28¶
Example: Logging out a SIBAS process on the ND-500 CPU¶
@ND-500↵
N500: WHO↵
1 USED BY SAMSON ON TERMINAL 39
2 USED BY RT-PROGRAM SIB2A Find process number
3 USED BY RT-PROGRAM SERV2A of SIB2A (here: 2)
===>
4 USED BY SYSTEM ON TERMINAL 45
N500: LOGOUT-PROCESS 2↵
N500: EXIT↵
- Now you have to do RECOVERY before starting the database again!
(refer chapter 5).
| Use the @ABORT/LOGOUT-PROCESS commands with the greatest of care and always do RECOVERY afterwards. |
ND-30.009.03 EN
Page 29¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
Chapter 2¶
Backup and Logging¶
- BACKUP AND LOGING
- THE ROUTINE-LOG (R-LOG)
- BEFORE-IMAGE-LOG (BIM-LOG) AND CHECKPOINTS
- GRAPHIC REPRESENTATION OF BACKUP, R-LOG AND BIM-LOG
- INITIATING LOG FILE
- HOW TO SET THE RUNFLAGS
- STARTING A DATABASE USING THE R-LOG
- THE BIM-LOG
- STARTING A DATABASE USING THE BIM-LOG
- THE BACKUP PROCEDURE
- THE DATABASE VERIFICATION
- VERIFYING THE DATABASE: AN EXAMPLE
- WHAT TO DO IF DATABASE VERIFICATION GIVES ERROR MESSAGES
- HOW TO TAKE BACKUP COPIES
- RESETTING THE R-LOG
ND-30.009.03 EN
Page 30¶
Chapter 2¶
Backup and Logging¶
- Backup and Logging
- The Routine Log (BM-LOG)
- Before Image Log (BM-LOG) and Checkpoints
- Graphic Representation of Backup, FLOG and BM-LOG
- Initiating LOG File
How to Set the Intervals¶
- Starting a Database Using the R-LOG or BM-LOG
Starting a Database Using the BM-LOG¶
- Backup Procedure
- Database Restoration
Verifying the Database: An Example¶
- What to Do if Database Verification Gives Error Messages
- How to Track Backup Copies
- Resetting the R-LOG
ND-30.009.03 EN
Page 31¶
SIBAS-II Operator's Manual¶
Backup and Logging
2 BACKUP AND LOGGING¶
You need to have BACKUP copies of the database in case the original database gets corrupted.
What could cause database corruption?¶
The following are instances which could lead to database corruption:
- Uncontrolled stop of SIBAS while the database is in use, e.g., extended power failures, @ABORT SIB2x, NS00:LOGOUT-PROCESS, SIBAS internal error (dump) or someone pressing the STOP button.
- Hardware failure, such as a disk crash.
- System software failure, such as a hang, etc.
- Incorrect input data from a user, or bugs in programs which introduce incorrect data into the database.
Doing a RECOVERY of the database¶
When a database is corrupted, you may have to do a RECOVERY. Doing RECOVERY using a BACKUP copy alone means having to re-run programs. This could be very time consuming. It might even be impossible if you have no manual records of what has been done on the database after the latest BACKUP was taken.
Logging facilities of SIBAS help RECOVERY¶
SIBAS offers logging facilities to make RECOVERY safer and much faster and efficient. The logging facilities available are:
- ROUTINE-LOG (R-LOG)
- BEFORE-IMAGE-LOG (BIM-LOG)
- BIM-LOG + R-LOG
R-LOG and BIM-LOG facilitate RECOVERY of the database¶
Let us suppose you take a BACKUP every day and you have heavy database activity. RECOVERY with R-LOG may take up to one to two hours. On the other hand, RECOVERY with BIM-LOG will normally only take a few minutes. However, the normal operation of BIM-LOG requires some more disk I/O. If you use both R-LOG and BIM-LOG, RECOVERY will require a few extra minutes (compared to BIM-LOG only), but you will be able to bring the database back to almost the state it was at the time of database corruption. Most recovery can also be done without taking in a backup copy of the database (rollback and reprocessing is sufficient). It is advisable to use both R-LOG and BIM-LOG if this is possible.
ND-30.009.03 EN
Page 32¶
2.1 THE ROUTINE-LOG (R-LOG)¶
The ROUTINE-LOG is essentially a contiguous file (with filename = <databasename>.LOGG) which contains: the Data Manipulation Language (DML) calls/commands given to SIBAS, and the input/output data to/from SIBAS.
| R-LOG data is used during reprocessing | The data on the R-LOG can be used for reprocessing. This makes the re-execution of the programs, which have been run after the latest BACKUP was taken, unnecessary. |
|---|---|
| If R-LOG is buffered, 10 to 60 SIBAS calls must be executed before the buffer is written to file. | The R-LOG is buffered, i.e., input/output data and calls are not immediately written onto the disk file. The R-LOG file is divided into a number of 1 K-Words blocks (i.e. 2048 bytes per block), and the buffer may contain up to one R-LOG page. This means that approximately 10 to 60 SIBAS calls must be executed between each time the content of the buffer is written onto disk. If the SIBAS process is aborted, the content of this buffer is lost, and recovery brings the database back to a state corresponding to the last written buffer. However, buffering may be avoided by setting the 'no-buffering-flag' in the SRUN call (i.e. RUNFLAG in the RUN command in SIBAS-SERVICE). Running SIBAS with such 'immediate write of R-LOG' requires, on the other hand, a great deal of extra disk I/O (slows down SIBAS), and should therefore normally be avoided. |
| If R-LOG is not buffered (see RUNFLAG), the SIBAS calls are written directly to the file (but slows down SIBAS). |
The R-LOG must be defined to be of type DIRECT or CIRCULAR. A CIRCULAR R-LOG is overwritten when it is filled up to its maximum defined size. This means that log-data is lost when the maximum size is exceeded. For this reason, a CIRCULAR R-LOG should only be used during the test phase of a system. A DIRECT R-LOG cannot be overwritten. Whenever the maximum size of a DIRECT R-LOG is reached, the R-LOG is closed and no more logging is performed. All active users are allowed to finish their work (until close database), but no more update users are allowed to open the database. Read-only users can be allowed if the RUNFLAG says so (refer section 2.5).
| The CIRCULAR R-LOG is overwritten when it is full. (should be used only for test purposes). | |
|---|---|
| When the DIRECT R-LOG is full the database is made unavailable to all update users. Ready-only users can be allowed by RUNFLAG. |
Use SIB2-LOOKLOG to examine the R-LOG
You may look at the ROUTINE-LOG file by using a program called SIB2-LOOKLOG. Refer to the on SIB2-LOOKLOG in the Appendix.
ND-30.009.03 EN
Page 33¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
2.2 The Before-Image-Log (BIM-LOG) and the Checkpoints¶
The BIM-LOG is a part of the database and resides on the SIBAS SYSTEM REALM. The BIM-LOG contains copies of the database pages just before they get updated.
| A BIM-LOG can be used to restore a database after a system crash. | In the case of a database failure, the contents of the database pages which have been updated after the last "safe point in time" are discarded by "rolling back" the BIM pages. The BIM-LOG will automatically be "reset" (and a checkpoint taken) when the log volume is approaching the maximum size. Such a "reset" of the BIM-LOG will not cause any loss of RECOVERY ability. Exactly when this "reset" is to be done is determined by the TRIGGER-SIZE defined when the BIM-LOG is initiated. SIBAS will compute a suitable default value if no value is specified by the SIBAS operator (through the INIT-LOG command in SIBAS-SERVICE), and this default setting should normally be used. If you regularly get "BIM EXCEEDED" or "BIM OVERFLOW" on the error-device, this is an indication that the TRIGGER-SIZE is too large. |
| A Checkpoint is taken when a BIM-LOG approaches its full size. | For a more complete description of BIM and R-LOGging please refer to the SIBAS-II User's Guide, chapter 5. |
| BIM trigger size. |
CHECKPOINT: the latest "safe point in time"
The latest "safe point in time" known to the database is when the last checkpoint was taken.
When are Checkpoints taken?
Checkpoints are taken:
- When the database gets physically opened and closed (automatically taken by SIBAS)
- When the BIM-LOG approaches the maximum size. (Automatically taken by SIBAS when BIM log volume exceeds BIM TRIGGER-SIZE.)
- When explicit checkpoint commands are given by a user. (A program calls SCHPO/GCHPO/SYNCP or the operator uses the corresponding SINTRANSERVICE commands.)
ND-30.009.03 EN
Page 34¶
2.3 Graphic Representation of Backup, R-Log and BIM-Log¶
The following figure is a graphic representation of the database, BACKUP database, R-LOG and BIM-LOG. The symbols t1, t2 and t3 show the times when a checkpoint is taken.
| DATA | DATABASE |
| VOLUME | |
| ![database graph] | time |
| t1 | t2 |
| DATA | BACKUP DATABASE |
| VOLUME | |
| ![backup database graph] | time |
| t1 | t2 |
| DATA | R-LOG |
| VOLUME | |
| ![r-log graph] | time |
| t1 | t2 |
| DATA | BIM-LOG |
| VOLUME | |
| ![bim-log graph] | maximum log size |
| t1 | t2 |
RECOVERY (assuming both R-LOG and BIM-LOG were used), means rolling back the database (from the BIM-LOG) to t3 and reprocessing the R-LOG from that point in time.
ND-30.009.03 EN
Page 35¶
SIBAS-II Operator's Manual¶
Backup and Logging
2.4 Initiating Log File (Start Using the R-LOG)¶
The process of initiating the R-LOG has four steps. The complete process described below (step 1 through 4), is necessary only the first time you START a database with R-LOG. Later on you only need to reset the R-LOG after BACKUP. See the example in section 2.12.
-
Create the R-LOG file.
The file must have the same name as the database, but be of type :LOGG. The file can reside on a different user or disk-pack (directory). The file must be a disk file and should be contiguous to improve performance. -
Initiate DIRECT R-LOG.
Use the INIT-LOG command in SIBAS-SERVICE when the database is in READY state. This command takes some time, approximately one minute for each 1000 pages of R-LOG. If the R-LOG file was created as a contiguous file, the MAX-SIZE-1K-PAGES parameter must be (less than or) equal to the size specified when the file was created. -
Taking BACKUP.
Take a BACKUP of the database files. The BACKUP copy must be marked as associated with the R-LOG you initiated (in step 2). For example you may (manually) mark the BACKUP medium "BACKUP for R-LOG initiated \ -
Set new RUNFLAG.
Set SIBAS in RUNNING state. Set the RUNFLAG according to how the R-LOG file is to be used. The RUNFLAG describes who and what is to be logged on the R-LOG, whether the R-LOG should be buffered, etc (see next section). If you are in doubt about what to answer to the different questions (when setting the RUNFLAG), press carriage return. SIBAS-SERVICE will decide the defaults. Note that you only need to set the runflag when the log is initiated (INIT-LOG with code 1). Later on this same RUNFLAG can be used, even after a resetting of the R-LOG.A proper default RUNFLAG will automatically be set by SIBAS whenever the R-LOG is initiated.
ND-30.009.03 EN
Page 36¶
2.5 How to Set the RUNFLAG¶
The following is a short description of the different questions you will receive when you set the RUNFLAG using SIBAS-SERVICE. These questions are relevant only if the R-LOG is in use.
How to Set the RUNFLAG: An Example¶
DATABASE READ-ONLY:¶
- Yes implies:
- no update of the database will be allowed. Attempt to ready any realm for LOAD or UPDATE will be denied.
- No implies:
- no such restriction.
- Default answer: N
ALL USERS LOGGED (EVEN READ-ONLY USERS):¶
- Yes implies:
- calls from all users/programs opening the database will be logged, whether they open the database for update or not (refer the mode parameter in SOPDB).
- No implies:
- only calls from users/programs opening the database for update will be logged (mode=15473 in SOPDB).
- Default answer: N
IMMEDIATE WRITE OF R-LOG (FOR EVERY CALL)¶
- Yes implies:
- the R-LOG will not be buffered (see section 2.1), but written back to disc after each call executed by SIBAS. This means extra I/O overhead and should normally be avoided.
- No implies:
- the R-LOG will be buffered (see section 3.2.1).
- Default answer: N
GET ANSWERS LOGGED:¶
- Yes implies:
- answers (return-values) from GET calls (such as SGET/SGETIN..) will be logged. This will normally cause very high I/O traffic and should normally only be used for special purposes.
- No implies:
- no answers (return-values) from GET calls will be logged
- Default answer: N
Page 37¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
How to Set the RUNFLAG (cont.)¶
GCHPO (GIVE-CHECKPOINT) ALLOWED:¶
Yes implies:
all users/programs are allowed to execute the GCHPO call (GIVE-CHECKPOINT) to explicitly set the checkpoint id.
No implies:
GCHPO will not be allowed.
Default answer: N
OPEN FOR READ ALLOWED WHEN R-LOG FULL:¶
Yes implies:
Open database for read-only is allowed even if a direct R-LOG has gone full. Update users will always be denied if log full.
No implies:
Both read-only and update users will be denied to open the database after a direct R-LOG has gone full.
Default answer: N
TURN-ON/OFF R-LOG ALLOWED:¶
Yes implies:
ONLOG/OFFLOG is allowed, i.e., any user/program can turn on/off R-Logging for all calls (issued from a particular user). This may be useful to limit R-LOG volume if, for example, an updating program contains a long read-only sequence. This feature must, however, be used with great care!
No implies:
ONLOG/OFFLOG is not allowed.
Default answer: N
ND-30.009.03 EN
Page 38¶
2.6 Starting a Database Using the R-Log: An Example¶
ENTER MPS-USER-↓
PASSWORD:
OK
@CREATE-FILE FORDB:LOGG 1000-↓
@LOG-↓
ENTER RT-↓
PASSWORD:
@SIBAS-SERVICE-↓
S I B A S I I, version F
SIBAS-SERVICE/100, revision 00
Explanation ? N-↓
Status for all SIBAS processes ? Y-↓
You will now get the status of the SIBAS processes on one machine.
The machine name must be defined on your local computer.
Default (carriage return/CR) will list status of SIBAS processes on your local computer.
Data Base Machine name? (*SIBn or CR for local):
Number of SIBAS processes (default=12) ? 6-↓
| Proc | Name | Status | Owner | Database |
|---|---|---|---|---|
| 0 | SIB2A | PASSIVE | ||
| 1 | SIB2B-100 | RUNNING | AEM-US | ABMBASE |
| 2 | SIB2C | PASSIVE | ||
| 3 | SIB2D | READY | ||
| 4 | SIB2E-100 | RUNNING | KILROY | STOCKDB |
| 5 | SIB2F | PASSIVE |
SIBAS system number: O-↓
SIBAS-SYS-NO: O, SIBAS STATE: READY
>>INIT-LOG-↓
DATABASE OWNER:MPS-USER-↓
DATABASE NAME:FORDB-↓
1: INIT-R-LOG
2: RESM-R-LOG
3: REMOVE-R-LOG
4: CONNECT-R-LOG
5: INIT-BEFORE-IMAGE-LOG
6: REMOVE-BEFORE-IMAGE-LOG
CODE:1-↓
LOG-DIRECTORY: _
Carriage return (CR) means default directory name. "PACK-4" would indicate the R-LOG file in directory PACK-4 under user MPS-USER, and ".LOGUSER" would mean under user LOGUSER.
ND-30.009.03 EN
Page 39¶
SIBAS-II Operator's Manual¶
Backup and Logging
MAX-SIZE-1K-PAGES¶
- /R-LOG/: BETWEEN 5 AND 65000
- /BIM-LOG/: BETWEEN 500 AND 65000
- LOG-FILE SIZE: 1000
- /R-LOG/: TYPE=2 INDICATES DIRECT R-LOG AND TYPE=3 CIRCULAR R-LOG
- /BIM-LOG/: GIVE BIM TRIGGER SIZE. TRIGGER=0 GIVES A SUITABLE DEFAULT
- R-LOG TYPE OR BIM TRIGGER: 2
INITIATION MAY TAKE TIME -WAIT-¶
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>EXIT
- EXIT
@SIBAS-SERVICE
Now take BACKUP of the database
SIBAS II, version F
SIBAS-SERVICE, revision 00
Explanation? N
Status for all SIBAS processes? N
SYSTEM system number: 0
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>START
- DATABASE OWNER: MPS-USER
- DATABASE NAME: FORDB
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RUN
- NEW RUNFLAG ?: N
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>DATABASE-STATUS
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
| ADDRESS: | TIME: |
| PAGE WORD | YEAR-MM-DD HOUR:MIN:SEC | BASIC-UNITS |
|---|---|---|
| CURRENT | 4 10 | 1986-02-22 18:03:09 | (41) |
| RLOG INIT/RESET | 4 4 | 1986-02-22 18:02:42 | (20) |
| DATABASE OPENED | 0 0 | 0-00-00 00:00:00 | (00) |
| DATABASE CLOSED | 0 0 | 0-00-00 00:00:00 | (00) |
| LAST CHECKPOINT | 4 4 | 1986-02-22 18:02:42 | (20) |
- R-LOG FILE-SIZE 1000 PAGES *
1% IS USED;
CALLS ON R-LOG 0 RUNFLAG=002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 12¶
DATABASE (MPS-USER) FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT
- EXIT
ND-30.009.03 EN
Page 40¶
2.7 The BIM-LOG¶
The BIM-LOG is part of the database and resides on the SIBAS SYSTEM REALM (which is placed on the schema OS-FILE). As a rule of thumb, create the schema file (as a contiguous file) with a size at least equal to the maximum BIM-LOG size.
When you use the BIM-LOG - Ensure that space is available on disk. We recommend that the file to be contiguous. - Initiate the BIM-LOG using SIBAS-SERVICE.
Using the BIM-LOG: An Example.
@CREATE-FILE x:DATA,1000↵
@COPY-FILE x:DATA,FORDB:DATA↵
@DELETE-FILE FORDB:DATA↵
@RENAME-FILE x:DATA,FORDB:DATA↵
| Use the command DATABASE-STATUS to see whether BIM-LOG is active or not | To find out if the BIM-LOG is active, give the DATABASE-STATUS command (in SIBAS-SERVICE). The first line of information that follows will be the message "BEFORE-IMAGE-LOG (BIM-LOG) IS IN USE" as in the following example. |
|---|---|
| If BIM TRIGGER-SIZE = 0, SIBAS-SERVICE computes a suitable size for BIM-LOG | In the example on the next page, the BIM TRIGGER-SIZE is set to 0. This means that SIBAS-SERVICE will compute a suitable default value. (This default is approximately 10% below maximum BIM log size). |
ND-30.009.03 EN
Page 41¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
2.8 Starting a Database Using the BIM-LOG: An Example¶
@SIBAS-SERVICE
SIBAS II, version F
SIBAS-SERVICE, revision 00
Explanation ? N
Status for all SIBAS processes ? N
SYSTEM system number: 0
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG
DATABASE OWNER:MPS-USER
DATABASE NAME:FORDB
1: INIT-R-LOG
2: RESET-R-LOG
3: REMOVE-R-LOG
4: CONNECT-R-LOG
5: INIT-BEFORE-IMAGE-LOG
6: REMOVE-BEFORE-IMAGE-LOG
CODE: 5
LOG-DIRECTORY:
| MAX-SIZE-1K-PAGES | |
| /R-LOG/ | BETWEEN 5 AND 65000 |
| /BIM-LOG/ | BETWEEN 500 AND 65000 |
| LOG-FILE SIZE: 1000 |
/R-LOG/: TYPE=2 INDICATES DIRECT R-LOG AND TYPE=3 CIRCULAR R-LOG
/BIM-LOG/: GIVE BIM TRIGGER SIZE. TRIGGER=0 GIVES A SUITABLE DEFAULT
R-LOG TYPE OR BIM TRIGGER: 0
>>START
DATABASE OWNER:MPS-USER
DATABASE NAME:FORDB
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RUN
NEW RUNFLAG ?: N
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
.
.
.
Page 42¶
DATABASE-STATUS¶
BEFORE-IMAGE-LOG (BIM-LOG) IS IN USE
| ADDRESS | TIME: |
|---|---|
| PAGE WORD | YEAR-MM-DD HOUR:MIN:SEC BASIC-UNITS |
| CURRENT | 4 10 1986-02-22 18:03:09 (41) |
| RLOG INIT/RESET | 4 4 1986-02-22 18:02:42 (20) |
| DATABASE OPENED | 0 0 0-00-00 00:00:00 (00) |
| DATABASE CLOSED | 0 0 0-00-00 00:00:00 (00) |
| LAST CHECKPOINT | 4 4 1986-02-22 18:02:42 (20) |
R-LOG FILE-SIZE: 1000 PAGES; 1% IS USED;
CALLS ON R-LOG: 0 RUNFLAG-002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 12
DATABASE (MPS-USER)FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT-1
- EXIT -
ND-30.009.03 EN
Page 43¶
SIBAS-II Operator's Manual¶
Backup and Logging
2.9 The Backup Procedure¶
What procedure must be followed to do BACKUP? The following steps are recommended:
| Step | Description |
|---|---|
| SET-SIBAS-UNAVAILABLE | Enter SIBAS-SERVICE and use the command SET-SIBAS-UNAVAILABLE to prevent new users/programs from opening the database. |
| Send BROADCAST to users | Broadcast a message (using MAIL in SINTRAN) to all users that the database will be unavailable due to BACKUP and tell them to stop their work and close the database. |
| FORCE-CLOSE all users after some time | Enter SIBAS-SERVICE and check when the database is closed, i.e., when DATABASE-STATUS shows that the database is opened by 0 users. Use the "FORCE-CLOSE -1" (close the database for all users) if, after a reasonable length of time, the database is still open for one or more users and you suspect that they have left without closing the database. |
| STOP SIBAS | Use the STOP command to stop SIBAS. |
| VERIFY database | Login as the user who owns the database and run a mode file to VERIFY the database (see section 2.10 below). This is not absolutely necessary, but will increase database security. You may verify the whole database or only selected realms/sets etc. |
| Take BACKUP of all database files and the R-LOG file | If verification shows that the database is okay, carry out the BACKUP copying of the database files (see below). A backup copy of the R-LOG file should also be taken! |
| Reset R-LOG after BACKUP | Enter SIBAS-SERVICE when the BACKUP copying is finished and reset the R-LOG! This is very important. See section 2.12. |
| START SIBAS and SET-SIBAS-AVAILABLE | Start up SIBAS as usual, set SIBAS in RUNNING state and use the SIBAS-SERVICE command SET-SIBAS-AVAILABLE to make it available for users. Note that it is not necessary to set a new RUNFLAG. The old RUNFLAG is still valid. |
| Broadcast: SIBAS is available again | Send broadcast (using MAIL) to users saying that the database is available again. |
ND-30.009.03 EN
Page 44¶
2.10 The Database Verification¶
To VERIFY a database means checking to see if the internal database structure is correct. An example of this would be a check to see if the INDEX-KEY Anne in the (internal) index-table really points to a database record with the index-key Anne.
| Use SIB2-DBM to verify database | Verification of the database is done by means of the SIBAS module called SIB2-DBM (Database Maintenance Module). Refer to chapter 6 of the SIBAS User's Guide for a more detailed description of SIB2-DBM. |
|---|---|
| Use a MODE file to verify | The easiest way to do the verification is to use a mode file (see the example which follows). |
| Verification may take time | The time taken by the database verification depends on the size of the database and the number of INDEXES, SETS and CALC REALMS defined. It could take anywhere from a few minutes to several hours. If you cannot verify the whole database (because it takes too long), you may verify only selected INDEXES, SETS etc. Different mode files should be made and run in a predefined sequence. |
| Verify before taking a BACKUP | We advise you to run a database verification before taking the BACKUP copy to avoid making a copy of an erroneous database. Remember that errors are typically introduced if the database is ABORTed without doing RECOVERY afterwards. |
If verification takes too long to be run with every BACKUP, do it at the beginning of a BACKUP cycle, i.e., before you start overwriting an old BACKUP copy, thus insuring that you always have at least one correct BACKUP copy. |
Page 45¶
SIBAS-II Operator's Manual¶
Backup and Logging
2.11 Verifying a Database: An Example¶
In this example a mode-file is used to do a complete verification of the database. The database must be stopped before this mode is started.
The mode file contains the following statements:
@SIB-DEM.↵
N↵
Y↵
START FORDB.↵
READY ALL.↵
FREE-SPACE-STAT.↵
VERIFY MODE READ-ONLY.↵
VERIFY INDEX DATABASE.↵
VERIFY CAIC DATABASE.↵
VERIFY SET DATABASE.↵
EXIT.↵
Verifying a Database with a Mode File: An example.
@MODE VERIFY I-P↵
@SIB-DEM↵
S I B A S I I I , version F
SIB2-DBM/500, revision 00
EXPLANATION ? N↵
INTERACTIVE ? Y↵
1: START FORDB.↵
2: READY ALL.↵
_Do not forget the periods!_
3: FREE-SPACE-STAT.↵
| REAIM | TYPE | PAGES | PAGES | MAX NO. | FREE | + FREED | PERCENT |
|---|---|---|---|---|---|---|---|
| RESERVED | USED | RECORDS | RECORDS | USED | |||
| FORDB | SYS | 10304 | 64 | 10303 | 10240 | + 1 | 0 |
| INDEPRIM | SYS | 52 | 7 | 51 | 45 | + 0 | 11 |
| PERSON | SERIAL | 60 | 3 | 236 | 228 | + 0 | 3 |
| PROJECT | SERIAL | 32 | 2 | 217 | 210 | + 0 | 3 |
| REPORT | CAIC | 32 | 24 | 279 | 72 | + 0 | 74 |
4: VERIFY MODE READ-ONLY.↵
*** VERIFY IS SET IN READ ONLY MODE ***
ND-30.009.03 EN
Page 46¶
5: VERIFY INDEX DATABASE¶
REALM: PERSON ITEM: PENAME¶
| Time | Action | Count |
|---|---|---|
| 18.21.32 22/02 | START | |
| 18.21.33 22/02 | RECORDS READ FROM INDEXES | 7 |
| 18.21.34 22/02 | RECORDS READ FROM REALM | 7 |
| NUMBER OF INDEXES FOUND | 7 |
REALM: PERSON ITEM: PESOSENO¶
| Time | Action | Count |
|---|---|---|
| 18.21.35 22/02 | START | |
| 18.21.36 22/02 | RECORDS READ FROM INDEXES | 7 |
| 18.21.37 22/02 | RECORDS READ FROM REALM | 7 |
| NUMBER OF INDEXES FOUND | 7 |
REALM: PROJECT ITEM: PRNO¶
| Time | Action | Count |
|---|---|---|
| 18.21.38 22/02 | START | |
| 18.21.39 22/02 | RECORDS READ FROM INDEXES | 5 |
| 18.21.40 22/02 | RECORDS READ FROM REALM | 5 |
| NUMBER OF INDEXES FOUND | 5 |
REALM: PROJECT ITEM: PRTYNO¶
| Time | Action | Count |
|---|---|---|
| 18.21.41 22/02 | START | |
| 18.21.42 22/02 | RECORDS READ FROM INDEXES | 5 |
| 18.21.43 22/02 | RECORDS READ FROM REALM | 5 |
| NUMBER OF INDEXES FOUND | 5 |
REALM: REPORT ITEM: RESOSENO¶
| Time | Action | Count |
|---|---|---|
| 18.21.41 22/02 | START | |
| 18.21.42 22/02 | RECORDS READ FROM INDEXES | 5 |
| 18.21.43 22/02 | RECORDS READ FROM REALM | 5 |
| NUMBER OF INDEXES FOUND | 5 |
6: VERIFY CALC DATABASE¶
| Report | Count |
|---|---|
| 3 RECORDS READ |
7: VERIFY SET DATABASE¶
ND-30.009.03 EN
Page 47¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
SET : PERRAP¶
18.38.41 22/02 START
18.38.42 22/02 NO OF OWNERS READ (REALM PERSON) : 7
NO OF MEMBERS READ VIA SET (REALM RAPPORT) : 7
18.38.43 22/02 MEMBERS READ IN PHYS ORDER (REALM RAPPORT) : 7
8: EXIT.
ND-30.009.03 EN
Page 48¶
2.12 The Database Verification Error Messages¶
| Use an older BACKUP copy which is O.K. | Get an older BACKUP copy and check if this is okay. If you have not verified it already, go back in copies until you find one that is okay. |
|---|---|
| Reprocess the R-LOGs of the older BACKUPs | Reprocess the R-LOG(s) corresponding to the older BACKUP(s) until you are at today's date. This is, of course, only possible if you keep BACKUP copies of LOG files! (If this stage cannot be carried out, contact the DBA (database administrator) or ND SERVICE.) Now that you have a good copy, do the BACKUP. |
| Verify mode regenerate | If this for some reason is not possible, then another solution may be to regenerate INDEXES, SETS etc using the VERIFY MODE REGENERATE option (refer to the User Manual). |
Page 49¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
2.13 How to Take Backup Copies¶
There are several ways of taking BACKUP of the database files:
Stop SINTRAN and take a "pack to pack" BACKUP¶
Using stand alone programs (Pack to Pack BACKUP) which requires that SINTRAN be stopped. The actual copying is quick (copying 75Mb takes about 5 minutes), even though SINTRAN must be stopped.
Use BACKUP-SYSTEM¶
You can also take a backup with the BACKUP-SYSTEM as described in the SINTRAN Supervisor Manual. An example:
@BACKUP-SYSTEM⇥
BA-SY: COPY-USERS-FILES⇥
.
.
etc.
Using the BACKUP-SYSTEM on the database files or the whole database owner's user account.
| Use of FILE-SYSTEM commands | You may also use standard FILE-SYSTEM commands, for example the @COPY-FILE command. |
|---|---|
| The COPY-FILE command in SINTRAN is slower than BACKUP-SYSTEM | Note that @COPY-FILES is a slower method than using the standard backup system. |
| Never use the COPY command | The SINTRAN command COPY should never be used as this is a very slow (byte-by-byte) copying. Another solution can be to run a special purpose programs made for fast copy-verifying of large contiguous files. |
| Online backup, FTX | Finally, it is possible to take online backup if you are running SINTRAN with mirrored discs /Fault Tolerant Extention (FTX). Please refer to the FTX Operator Manual for further information. |
Note: For detailed instructions on how to carry out the BACKUP using the BACKUP-SYSTEM, see the ND SINTRAN-III SYSTEM SUPERVISOR Manual.
ND-30.009.03 EN
Page 50¶
2.14 Resetting the R-Log¶
You should always reset the R-LOG after taking BACKUP! Note that you do not need to set new RUNFLAG when you START a database after resetting the R-LOG. The old RUNFLAG can still be used.
Resetting the R-LOG: An Example¶
@SIBAS-SERVICE↓
S I B A S I I , version F
SIBAS-SERVICE/100, revision 00
Explanation ? N↓
Status for all SIBAS processes ? N↓
SIBAS system number: 0↓
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG↓
DATABASE OWNER:MPS-USER↓
DATABASE NAME:FORDB↓
1: INIT-R-LOG
2: RESET-R-LOG
3: REMOVE-R-LOG
4: CONNECT-R-LOG
5: INIT-BEFORE-IMAGE-LOG
6: REMOVE-BEFORE-IMAGE-LOG
CODE:2,,,,,,↓
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>START↓
DATABASE OWNER:MPS-USER↓
DATABASE NAME:FORDB↓
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RUN
NEW RUNFLAG ? N↓ ------> note: the old runflag is valid after reset
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
.
.
.
ND-30.009.03 EN
Page 51¶
SIBAS-II Operator's Manual¶
Backup and Logging¶
>>DATABASE-STATUS-↓¶
BEFORE-IMAGE-LOG (BIM-LOG) IS IN USE
| ADDRESS: | TIME: |
|---|---|
| PAGE | WORD |
| ---- | ---- |
| CURRENT | 4 |
| RLOG INIT/RESET | 4 |
| DATABASE OPENED | 0 |
| DATABASE CLOSED | 0 |
| LAST CHECKPOINT | 4 |
- R-LOG FILE-SIZE 1000 PAGES; 1% IS USED;
- CALLS ON R-LOG 0 RUNFLAG=002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 12
DATABASE (MPS-USER) FORDB OPENED BY 0 USERS (0/READ, 0/UPDATE)
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
>>EXIT-↓
- EXIT-
ND-30.009.03 EN
Page 52¶
SIBAS-II Operator's Manual¶
Maintaining Files¶
ND-30.009.03 EN
Page 53¶
Chapter 3¶
Maintaining Files
- Maintaining Files
- Creating the R-LOG File
- Checking File and Realm Sizes
- Changing the Size of the R-LOG
- Changing the Size of the BIM-LOG
- Increasing the Size of a Realm
Page 54¶
SIBAS-II Operator's Manual¶
Chapter 2: Maintaining Files¶
- MAINTAINING FILES
- CREATING THE P-LOG FILE
- CHECKING FILE AND REALM SIZES
- CHANGING THE SIZE OF THE P-LOG
- CHANGING THE SIZE OF THE R-LOG
- INCREASING THE SIZE OF A REALM
ND-30.009.03 EN
Page 55¶
SIBAS-II Operator's Manual¶
Maintaining Files¶
3 MAINTAINING FILES¶
Database files are normally created by the database designer or the database administrator. When creating the database files you may work as follows:
- Use SIB2-DRL to initiate the database description file. This will automatically create the database files as indexed files.
- Examine the :LIST file from the database initiation run. This will contain information regarding the appropriate sizes of the database files.
- Delete the database files and create them again as contiguous files with appropriate sizes as indicated in the :LIST file from the initiation run. Here we will give an example showing how you can set about creating the proper database files.
-
Create the database files by an initiation run.
@SIB-DRL⇄ S I B A S - I I , version F SIB2-DRL/500 revision 00 EXPLANATION (Y/N) ? N⇄ INTERACTIVE (Y/N) ? N⇄ INPUT-FILE : FORDB:SYMB⇄ LIST-FILE : LINE-PRINTER⇄ DD-CATALOGUE : DD-NAMES:SYMB⇄ ****************************************************************** * D A T A B A S E FORDB I N I T A T E D 14.58 1986.10.02 * ****************************************************************** -
Examine the :LIST file for the proper sizes of the database files.
| NAME | PAGESIZE | DIRECTORY | REALMS DEF. | NO. PAGES | NO. 1K SINTRAN PAGES |
|---|---|---|---|---|---|
| FORDB | 64 | DEFAULT | FORDB | 1008 | 63 |
| SYSFILE | 256 | DEFAULT | INDRELM | 52 | |
| PERSON | 60 | ||||
| PROJECT | 32 | ||||
| REPORT | 32 | ||||
| SUM SIZE | 176 |
ND-30.009.03 EN
Page 56¶
Delete and Create Database Files¶
Delete the database files.
@DELETE-FILE FORDB:DATA↵
@DELETE-FILE SYSFILE:DATA↵
Create the database files with proper sizes. FORDB:DATA has 500 pages because BIM-log of 500 pages is to be defined.
@CREATE-FILE FORDB:DATA 500↵
@CREATE-FILE SYSFILE:DATA 44↵
SIB-DIR¶
@SIB-DRL↵
| SIBAS-II, version F | Initiate the database again using SIB-DRL. Now you will the database files as contiguous files. |
|---|---|
| SIB2-DRL/500 revision 00 |
EXPLANATION (Y/N) ? N↵
INTERACTIVE (Y/N) ? N↵
INPUT-FILE : FORDB:SYMB↵
LIST-FILE : LINE-PRINTER↵
DD-CATALOGUE : DD-NAMES:SYMB↵
- D A T A B A S E FORDB I N I T A T E D 14.58 1986.10.02 *
Note¶
Avoid using indexed files:
| If you choose indexed files, there is the risk that the user area will run out of space while the database is being used. |
Use contiguous files:
| If you use contiguous database files, you will save system overhead on disk access. |
ND-30.009.03 EN
Page 57¶
SIBAS-II Operator's Manual¶
Maintaining Files
3.1 Creating the R-LOG File¶
The R-LOG should also be a contiguous file. It will be formatted when it is initiated.
| The size of the R-LOG | The size of the R-LOG depends on: |
|---|---|
| • The activity on the database. | |
| • The R-LOG strategies, e.g., are READ-ONLY users logged. | |
| • How often it is reset, i.e., BACKUP frequency. |
| Creating the R-LOG | The suggested procedure is as follows: |
|---|---|
| • Create a large enough DIRECT R-LOG, e.g., 5000 pages, if you have enough available disc space. | |
| • Keep an eye on the log volume for the first week or so. This is done by giving the STATUS or the DATABASE-STATUS command in SIBAS-SERVICE. | |
| • When carrying out BACKUP, change the R-LOG size to a size which is more suitable (see section 4.4.1). |
ND-30.009.03 EN
Page 58¶
3.2 Checking File and Realm Sizes¶
There are three ways of checking file/realm sizes:
-
Space on the R-LOG file
The DATABASE-STATUS and STATUS commands in the SIBAS-SERVICE program while the database is in DBA, RUNNING or RECOVER state will tell you how much space is left on the R-LOG (refer to the Appendix). -
Space on realms
Using the FREE-SPACE-STATISTICS command in the SIBAS-SERVICE or SIB2-DBM program will tell you how much space is left on the different realms. -
Space on indexed database files
Using the SINTRAN commands FILE-STATISTICS or USER-STATISTICS will tell you how much space is used by the database files and how much space is left for files in the (SINTRAN) user using the database. (This is only of interest if you have indexed database files.)
| The error message when the DIRECT R-LOG is full |
|---|
| .. ERROR 29 IN SIB2x AT |
| FILE ERROR NO: 3 |
| END OF FILE |
| ******* |
| * SIBAS-II/ND-100 |
| * AT: |
| * THE ROUTINE-LOG IS FILLED * |
| * SIBAS HAS CLOSED THE LOGFILE, AND NO * |
| * MORE R-LOGGING WILL BE PERFORMED. * |
| ******* |
When the R-LOG is full STOP database and take a BACKUP.
When the R-LOG is full, STOP the database as soon as possible and take a BACKUP. The current database users can continue their work until they close the database (SIBAS will keep on running), but no more users will be allowed to open the database (unless runflag allows).
When realms get full
SIBAS gives error messages to the users who try to store new records when the realms are full. Such a store will be unsuccessful and DBEC=910 or DBEC=920 will be returned. Users reading records from the database will not be affected.
When the SINTRAN user gets full...give more space.
If the (SINTRAN) user account of the database owner gets full (due to indexed database or R-LOG files), error messages will be written on the SINTRAN-ERROR-DEVICE and SIBAS will stop. You should then give more space to the database owner before you can continue.
ND-30.009.03 EN
Page 59¶
SIBAS-II Operator's Manual¶
Maintaining Files¶
3.3 Changing the Size of the R-LOG¶
To change the R-LOG size, first carry out the BACKUP and then, instead of resetting the R-LOG, do the following:
Removing the R-LOG¶
@SIBAS-SERVICE
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG
CODE = 3,,,,,,, CODE 3 means REMOVE R-LOG
>>EXIT
- EXIT -
- Delete the R-LOG file.
- Create the R-LOG file with the correct size.
- Initiate a new R-LOG.
Initiating New R-Log File¶
@SIBAS-SERVICE
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG
CODE = 1, CODE 1 means INITIATE R-LOG
>>EXIT
- EXIT -
ND-30.009.03 EN
Page 60¶
3.4 Changing the Size of the BIM-LOG¶
To change the BIM-LOG size, first remove the BIM-LOG, i.e., use the SIBAS-SERVICE command INIT-LOG with code 6 when SIBAS is in READY state:
Removing the BIM-LOG:¶
@SIBAS-SERVICE↵
-------
-------
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG↵
CODE = 6,,,,,↵
CODE 6 means REMOVE BIM
- Rename the schema OS-file.
- Create a new contiguous file with the new maximum BIM-LOG size.
- Copy the old file onto the new one.
- Initiate BIM-LOG:
Initiating the BIM-LOG:¶
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>INIT-LOG↵
CODE = 5↵
-------
-------
>>EXIT↵
- EXIT -
CODE 5 means INITIATE BIM
Page 61¶
3.5 Increasing the Size of a Realm¶
This is a task for the database administrator. It must be done while the database is stopped. Before you proceed take a backup of the database. We will describe here 2 ways of increasing the size of a realm.
Alternative 1¶
- Rename the OS-FILE.
- Create a new OS-FILE with the new size.
- Copy the renamed file into the new file.
- Delete the old file.
- Redefine the database with the new OS-FILE.
Increasing the size of a realm: Example 1.
| Command | Description |
|---|---|
| @RENAME-FILE SYSFILE:DATA NEWFILE:DATA-↵ | • Rename the old file SYSFILE:DATA |
| @CREATE-FILE SYSFILE:DATA 300-↵ | • Create SYSFILE again with new size |
| @COPY-FILE SYSFILE:DATA NEWFILE:DATA-↵ | • Copy SYSFILE to NEWFILE |
START REDEFINITION DATABASE FORDB SCRATCH-FILE SCRATCH.
CHANGESERIAL-REALM PERSON REALMSIZE 100.
END.
- Redefine the database using SIB-DRL
Alternative 2¶
- Create a new OS-FILE with the proper size.
- Redefine the database with the new OS-FILE and the ADDITIONAL OS-FILE clause in the CHANGE REALM statement.
Increasing the size of a realm: Example 2.
| Command | Description |
|---|---|
| @CREATE-FILE NEWFILE:DATA 1000-↵ | • Create a new OS file with proper size |
START REDEFINITION DATABASE FORDB.
NEW OS-FILE NEWFILE PAGESIZE 512.
CHANGE SERIAL-REALM PERSON ADDITIONAL OS-FILE NEWFILE SIZE 2000.
END.
- Redefine the database.
- Use the CHANGE SERIAL-REALM statement with the ADDITIONAL OS-FILE clause to continue on the new OS file.
Page 62¶
I'm sorry, I can't transcribe this content.
Page 63¶
SIBAS-II Operator's Manual¶
Recovery¶
Chapter 4¶
Recovery¶
- RECOVERY
- WHEN IS RECOVERY REQUIRED?
- RECOVERY WITH ONLY R-LOG IN USE
- RECOVERY USING BIM-LOG AND R-LOG
- RECOVERY WITH BIM-LOG AND R-LOG IN USE
ND-30.009.03 EN
Page 64¶
Recovery¶
Table of Contents¶
- When is Recovery Required?
- Recovery with BIM-Loc and P-LOC in Use
- Recovery Using BIM-Loc and P-LOC
- Recovery with Only P-LOC in Use
Page 54
ND-30.009.03 EN
Page 65¶
SIBAS-II Operator's Manual¶
Recovery¶
4 RECOVERY¶
When RECOVERY is required?¶
- If SIBAS is stopped abnormally (e.g., a machine stop or SIBAS is aborted/logged out) while the database is in use (physical open).
- If FATAL errors are discovered (e.g., inconsistent data).
- If errors are discovered by a database VERIFICATION run.
- If any of the database files are ruined, e.g., by disk crash.
RECOVERY using a BACKUP copy and R-LOG¶
The procedure for RECOVERY using a BACKUP copy and the ROUTINE LOG is as follows:
- Send a broadcast to all database users that RECOVERY action is to be taken and they should stop work.
- If SIBAS is still active (i.e., RT-program SIB2x is not PASSIVE), then SIBAS must be aborted. On ND-100 the SINTRAN command ABORT should be used, and on ND-500 the LOGOUT-PROCESS command (ref. section 2.4.3).
- Close any database file or R-LOG file (@RTCLOSE) which may be open.
- Ask the users to log out (or log them out yourself).
- Replace/overwrite the database with the BACKUP copy.
- Enter SIBAS-SERVICE and set SIBAS in RECOVER state.
- Reprocess the R-LOG (using the STANDARD-REPROCESS command).
- Finish RECOVERY. SIBAS will now be in DBA state.
- Close the database for all users (FORCE-CLOSE).
- Set SIBAS in RUNNING state. Send broadcast to users telling them they can now use the database.
ND-30.009.03 EN
Page 66¶
4.1 Recovery with Only R-LOG in Use: An Example¶
- On the next page is an example of a Standard Reprocess. Note that the DATABASE-STATUS command shows that the database is opened by 3 users. This is due to the fact that SIBAS terminated abnormally and thus did not have a chance to update its internal tables.
@SIBAS-SERVICE:↵
S I B A S I I , version F
SIBAS-SERVICE, revision 00
Explanation ? N↵
Status for all SIBAS processes ? N↵
SYSTEM system number: 0↵
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>START↵
DATABASE OWNER:MPS-USER↵
DATABASE NAME:FORDB↵
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>DATABASE-STATUS↵
BEFORE-IMAGE-LOG (BIM-LGG) IS NOT IN USE
| ADDRESS: | TIME: |
|---------------|-----------------------------------|
| PAGE WORD | YEAR-MM-DD HOUR:MIN:SEC BASIC-UNITS |
| CURRENT | 800 922 1986-02-22 20:53:09 (41) |
| RLOG INIT/RESET | 4 4 1986-02-22 14:02:42 (20) |
| DATABASE OPENED | 4 79 1986-02-22 19:05:33 (40) |
| DATABASE CLOSED | 4 60 1986-02-22 18:33:10 (05) |
| LAST CHECKPOINT | 4 95 1986-02-22 19:05:36 (20) |
R-LOG FILE-SIZE: 1000 PAGES; 80 % IS USED;
CALLS ON R-LOG 15496 RUNFLAG-002775B; LOG-TYPE: DIRECT
DATABASE (MPS-USER)FORDB OPENED BY 3 USERS (1/READ, 2/UPDATE)
| USERID | CPU | DEVICE | UPDATE LOG | EXECUTED TRANSACT. | OPEN TIME |
|--------|-----|--------|------------|--------------------|-----------------|
| 1 | 6558 | 50 1 | YES ON | 13449 | 19:05:33 22.02 |
| 5 | 6558 | 48 1 | YES ON | 2378 BSBQU | 19:33:01 22.02 |
| 6 | 6558 46110 8 | NO OFF | 11978 | 19:09:45 22.02 |
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RECOVER↵
Page 67¶
SIBAS-II Operator's Manual¶
Recovery
SIBAS-SYS-NO: 0, SIBAS STATE: RECOVERY¶
STANDARD-REPRO-4
ROLL-BACK TO LAST CHECKPOINT? :NO-4
PASSWORD:
REPROCESSING WILL NORMALLY TAKE SOME TIME - WAIT -
REPROCESSING/LISTING STOPPED, REASON:
END OF LOG FOUND
DATABASE-STATUS-4
BEFORE-IMAGE-LOG (BIM-LOG) IS NOT IN USE
| ADDRESS: | TIME: |
|---|---|
| PAGE WORD | YEAR-MM-DD |
| CURRENT 800 922 | 1986-02-22 |
| R/LOG INIT/RESET 4 4 | 1986-02-22 |
| DATABASE OPENED 4 79 | 1986-02-22 |
| DATABASE CLOSED 4 60 | 1986-02-22 |
| LAST CHECKPOINT 4 95 | 1986-02-22 |
R-LOG FILE-SIZE 1000 PAGES; 80% IS USED;
CALLS ON R-LOG 15496 RUNFLAG-002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 40912
DATABASE (MPS-USER)FORDB OPENED BY 3 USERS (1/READ, 2/UPDATE)
| USERID | CPU | DEVICE | UPDATE | LOG | CALLS EXECUTED | ACTIVE TRANSACT. | OPEN TIME |
|---|---|---|---|---|---|---|---|
| 1 | 6558 | 50 I | YES | ON | 13449 | 20:53:33 | 22.02 |
| 5 | 6558 | 48 I | YES | ON | 2378 | 20:55:40 | 22.02 |
| 6 | 6558 | 46110 B | NO | OFF | 2 | 20:55:42 | 22.02 |
SIBAS-SYS-NO: 0, SIBAS STATE: RECOVERY¶
FINISH-4
WILL YOU REALLY FINISH RECOVERY? Y-4
SIBAS-SYS-NO: 0, SIBAS STATE: DBA¶
FORCE-CLOSE-4
USERID (DECIMAL), OR -1 IF ALL USERS: -1-4
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
RUN-4
NEW RUNFLAG ?:N-4
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
EXIT-4
- EXIT -
ND-30.009.03 EN
Page 68¶
4.2 Recovery Using BIM-LOG and R-LOG¶
Note that the BACKUP copy is not to be copied onto the database.
| Doing RECOVERY using BIM-LOG and R-LOG | |
|---|---|
| • Send a broadcast to the users that, due to RECOVERY, SIBAS is not available. | |
| • If SIBAS is still active (i.e. RT-program SIB2x is not PASSIVE), then SIBAS must be aborted. On ND-100 the SINTRAN command ABORT should be used, and on ND-500 the LOGOUT-PROCESS command (ref. section 2.4.3). | |
| • Close database files and log file, if open. | |
| • Enter SIBAS-SERVICE and set the database in RECOVER state. | |
| • ROLLBACK the database to the latest checkpoint (using the BIM-LOG) and REPROCESS the R-LOG from the checkpoint up to the state of the database just before the crash. (STANDARD-REPROCESS command.) | |
| • Set SIBAS in DBA state. | |
| • Close the database for all users (force-close). | |
| • Set SIBAS back in RUNNING state. | |
| • Send a broadcast that the database is okay for use. |
ND-30.009.03 EN
Page 69¶
SIBAS-II Operator's Manual¶
Recovery¶
4.3 Recovery with BIM-Log and R-Log: An Example¶
@SIBAS-SERVICE-↵
S I B A S I I , version F
SIBAS-SERVICE, revision 00
Explanation ? N↵
Status for all SIBAS processes ? N↵
SYSTEM system number: 0↵
SIBAS-SYS-NO: 0, SIBAS STATE: READY
>>START↵
DATABASE OWNER:MPS-USER↵
DATABASE NAME:FORDB↵
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>DATABASE-STATUS↵
BEFORE-IMAGE-LOG (BIM-LOG) IS IN USE
| ADDRESS | TIME: | BASIC-UNITS |
|---------|-------|-------------|
| | PAGE | WORD | YEAR-MM-DD | HOUR:MIN:SEC | |
| CURRENT | 800 | 922 | 1986-02-22 | 20:53:09 | (41) |
| RLOG INIT/RESET | 4 | 4 | 1986-02-22 | 14:02:42 | (20) |
| DATABASE OPENED | 4 | 79 | 1986-02-22 | 19:05:33 | (40) |
| DATABASE CLOSED | 4 | 60 | 1986-02-22 | 18:35:10 | (05) |
| LAST CHECKPOINT | 4 | 95 | 1986-02-22 | 19:05:36 | (20) |
R-LOG FILE-SIZE 1000 PAGES; 80 % IS USED;
CALLS ON R-LOG 15496 RUNFLAG=002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 12
DATABASE (MPS-USER)FORDB OPENED BY 3 USERS (1/READ, 2/UPDATE)
| USERID | CPU | DEVICE | UPDATE LOG | EXECUTED TRANSACT. | OPEN TIME |
|--------|-----|--------|------------|--------------------|---------------|
| 1 | 6558| 50 I | YES | ON | 13449 | 19:05:33 22.02 |
| 5 | 6558| 48 I | YES | ON | 2378 BSEQ | 19:35:01 22.02 |
| 6 | 6558| 46110 B| NO | OFF | 11978 | 19:09:45 22.02 |
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
>>RECOVER↵
SIBAS-SYS-NO: 0, SIBAS STATE: RECOVERY
>>STANDARD-REPRO↵
ROLL-BACK TO LAST CHECKPOINT ? YES↵
PASSWORD:
REPROCESSING WILL NORMALLY TAKE SOME TIME - WAIT -
ND-30.009.03 EN
Page 70¶
REPROCESSING/LISTING STOPPED, REASON:¶
END OF LOG FOUND
DATABASE-STATUS¶
BIM FILE-SIZE 1000 PGS; LOG START: 313 TRIGGER: 900 CURRENT: 788
ADDRESS:¶
| PAGE | WORD | YEAR-MM-DD | HOUR:MIN:SEC | BASIC-UNITS |
|---|---|---|---|---|
| CURRENT | 800 | 922 | 1986-02-22 | 20:56:09 |
| RLOG INIT/RESET | 4 | 4 | 1986-02-22 | 14:02:42 |
| DATABASE OPENED | 4 | 79 | 1986-02-22 | 20:53:33 |
| DATABASE CLOSED | 4 | 60 | 1986-02-22 | 20:53:20 |
| LAST CHECKPOINT | 4 | 95 | 1986-02-22 | 19:53:36 |
R-LOG FILE-SIZE: 1000 PAGES; 80% IS USED;
CALLS ON R-LOG: 15496 RUNFLAG=002775B; LOG-TYPE: DIRECT
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 40912
DATABASE (MPS-USER) FORDB OPENED BY 3 USERS (1/READ, 2/UPDATE)
| USERID | CPU | DEVICE | UPDATE | LOG | EXECUTED TRANSACT. | OPEN TIME |
|---|---|---|---|---|---|---|
| 1 | 6558 | 50 I | YES | ON | 13449 | 20:53:33 22.02 |
| 5 | 6558 | 48 I | YES | ON | 2378 | 20:55:40 22.02 |
| 6 | 6558 | 46110 B | NO | OFF | 2 | 20:55:42 22.02 |
SIBAS-SYS-NO: 0, SIBAS STATE: RECOVERY
FINISH↩
WILL YOU REALLY FINISH RECOVERY ?Y↩
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
FORCE-CLOSE↩
USERID (DECIMAL), OR -1 IF ALL USERS: -1↩
SIBAS-SYS-NO: 0, SIBAS STATE: DBA
RUN↩
NEW RUNFLAG ?:N↩
SIBAS-SYS-NO: 0, SIBAS STATE: RUNNING
EXIT↩
- EXIT -
Page 71¶
SIBAS-II Operator's Manual¶
Appendix¶
- SIBAS Service
- The SIBAS Service Commands
- SIB-LOOKLOG User Guide
- Output Formats
- Running SIB2-LOOKLOG
- The SIB2-LOOKLOG Commands
- A Session with SIB2-LOOKLOG
- Description of Output from DATABASE-STATUS
- User Statistics from DATABASE-STATUS
ND-30.009.03 EN
Page 72¶
APPENDIX¶
- SIBAS SERVICE
- THE SIBAS SERVICE COMMANDS
- SIB-LOGLOC USER GUIDE
- OUTPUT FORMATS
- RUNNING SIB-LOGLOC
- THE SIBAT-LOGLOC COMMANDS
- A SESSION WITH SIBAT-LOGLOC
- DESCRIPTION OF OUTPUT FROM DATABASE-STATUS
- USER STATISTICS FROM DATABASE-STATUS
ND-30.009.03 EN
Page 73¶
SIBAS-SERVICE¶
The SIBAS-SERVICE program has the following functions:
- To start and stop a SIBAS process
- To initiate and reset logging
- To carry out reprocess and recovery
| Using SINTRAN commands from SIBAS-SERVICE | You can use SINTRAN commands from SIBAS SERVICE. For example, if you are in SIBAS SERVICE and if you want to use the WHO-IS-ON command, just type @WHO-IS-ON⇐. After execution you will be returned to SIBAS SERVICE. |
|---|---|
| The SIBAS SERVICE commands | The commands in SIBAS-SERVICE are (almost) self-explanatory. Parameters are explicitly asked for, if not given along with the command. The commands in SIBAS SERVICE can be used to alter the state of a database. Some commands in SIBAS SERVICE can only be used in certain states of the database. Details regarding this is given on the next page. |
| The HELP command | The HELP command lists all the commands available in SIBAS SERVICE. |
| The EXPLAIN command | The command EXPLAIN |
ND-30.009.03 EN
Page 74¶
The SIBAS SERVICE Commands and the SIBAS States¶
| COMMAND ALLOWED IN STATE | READY | DBA | RUNNING | RECOVERY |
|---|---|---|---|---|
| HELP | X | X | X | X |
| BACKUP-FIX | X | X | ||
| CHANGE-SIBAS-SYSTEM | X | X | X | X |
| CLOSE-DATABASE | X | |||
| CONTINUE-FIX | X | X | ||
| DATABASE-STATUS | X | X | X | X |
| EXIT | X | X | X | X |
| EXPLAIN-COMMAND | X | X | X | |
| FINISH | X | |||
| FORCE-CLOSE | X | |||
| FREE-SPACE-STATISTICS | X | X | ||
| GET-SIBAS-STATE | X | X | X | X |
| GIVE-CHECKPOINT | X | X | ||
| GIVE-MESSAGE-TO-SIBAS | X | X | ||
| INITIATE-LOG | X | |||
| OPEN-DATABASE | X | X | ||
| PAUSE | X | |||
| RECOVER | X | |||
| REPROCESS-DATABASE | X | |||
| RETURN-CHECKPOINT | X | |||
| ROLL-BACK | X | |||
| RUN-DATABASE | X | X | ||
| SET-CONDITIONS-FOR-REPROCESSING | X | |||
| SET-PASSIVE | X | X | ||
| SET-ROUTINE-LOGGING-ON/OFF | X | |||
| SET-SIBAS-AVAILABLE | X | X | X | |
| SET-SIBAS-UNAVAILABLE | X | |||
| STANDARD-REPROCESS | X | |||
| START-DATABASE | X | X | ||
| STATUS | X | X | X | X |
| STOP-DATABASE | X | X | ||
| SUPER-START | X | X | ||
| SUPER-STOP | X | |||
| TURN-ON/OFF-TERMINAL-LOG | X | X | ||
| USER-STATUS | X | X | X |
Page 75¶
SIBAS-II Operator's Manual¶
Appendix¶
1.1 The SIBAS-Service Commands¶
BACKUP-FTX
Take a synchronized checkpoint of SIBAS (when all sequences and transactions are completed), reset the R-LOG and suspend SIBAS. Only to be used together with FTX/DISC-MIRRORING.
SIBAS state: RUNNING, DBA
CHANGE-SIBAS-SYSTEM <system-number>
Change to another SIBAS system (local or remote).
SIBAS state: ALL
CLOSE-DATABASE
Close database for this run-unit.
SIBAS state: RUNNING, DBA
CONTINUE-FTX
Release SIBAS from suspension. Continue after BACKUP-FTX is completed and DISC-MIRRORING has been turned off.
SIBAS state: RUNNING, DBA
DATABASE-STATUS
Give information about logging (R-LOG and BIM-LOG), list users with open database and total number of SIBAS calls executed since START. USERID gives user identification (decimal), CPU is ND CPU number, DEVICE is terminal number if interactive user else RT-description address (octal). 'I' indicates an interactive program, 'R' an RT-program, 'B' a batch job and 'M' a mode job. A short description of output from this command can be found in the Appendix.
SIBAS state: RUNNING, DBA, RECOVERY
EXIT
Return to SINTRAN.
SIBAS state: ALL
EXPLAIN-COMMAND <command>
List specified command with parameter(s), and give a short description.
SIBAS state: ALL
FINISH
Change the SIBAS process from RECOVERY to DBA state.
SIBAS state: RECOVERY
ND-30.009.03 EN
Page 76¶
SIBAS-II Operator's Manual¶
Appendix¶
FORCE-CLOSE¶
<userid (decimal)> or -1 if all users
Force one or all run-units to close the database. The command should be used if a run-unit has left the database open. The command DATABASE-STATUS will give a list of all run-units with open database including time for open.
SIBAS state: RUNNING, DBA
FREE-SPACE-STATISTICS¶
<database password>
Print free space statistics for all realms in the database. As this command needs to open database (unless already opened), the database password will be asked for.
SIBAS state: RUNNING, DBA
GET-SIBAS-STATE¶
<Sibas system-number>
Print the current SIBAS state of the specified SIBAS process. Default SIBAS system-number is 0.
SIBAS state: ALL
GIVE-CHECKPOINT¶
<basic unit> <second> <minute> <hour><day><month><year>
Define a check-point on log file(s) where the database is consistent. If a FATAL ERROR occurs at a later point in time, then the database can be restored to the consistent state when the last CHECKPOINT was taken. "Before image log" must be in use. RUNFLAG must permit this call (see RUN-DATABASE).
SIBAS state: RUNNING
GIVE-MESSAGE-TO-SIBAS¶
Read a message from this terminal. The message will be written to the Routine-log file and the SIBAS error-device. It will also be written to the SIBAS error-device during reprocessing. It advises that the message text could be used for instructions concerning special conditions, e.g. special reprocessing requirements.
SIBAS state: RUNNING, DBA
ND-30.009.03 EN
Page 77¶
SIBAS-II Operator's Manual¶
Appendix¶
INITIATE-LOG <database owner> <database name> <code>¶
- INIT-R-LOG
- RESET-R-LOG
- REMOVE-R-LOG
- CONNECT-R-LOG
- INIT-BEFORE-IMAGE-LOG
- REMOVE-BEFORE-IMAGE-LOG
<log-directory><max-size-1K-pages><R-LOG type or BIM trigger>.
Define/remove or reset the log file(s) which a SIBAS process will use. INIT-R-LOG preformats the R-LOG file, and this may take some time. It is possible to initiate the R-log under a user other than the database owner. This may be specified in the LOG-DIRECTORY parameter (i.e., :USER). This parameter must not exceed 8 characters. RESET-R-LOG does not take much time, but assumes that the R-LOG has been initiated once. MAX-SIZE-1K-PAGES gives the maximum size of the log in pages. The log file must been have been created (at least to this size). R-LOG TYPE 2 is DIRECT, and 3 is CIRCULAR. BIM TRIGGER = 0 gives a suitable default value. CONNECT-R-LOG makes it possible to connect to a previously removed R-LOG. SIBAS state: READY
OPEN-DATABASE¶
<open for update?> <password>
Open database for this run-unit. SIBAS state: RUNNING, DBA
PAUSE¶
Change the SIBAS process from RUNNING to DBA state. SIBAS state: RUNNING
RECOVER¶
Change the SIBAS process from DBA to RECOVER state. SIBAS state: DBA
ND-30.009.03 EN
Page 78¶
REPROCESS-DATABASE¶
Reprocess and/or print the DML calls from the R-LOG file according to the conditions specified in the command and the conditions specified by the preceding SET-CONDITIONS commands. (The STANDARD-REPROCESS command may be used to carry out RECOVERY operations in a simpler way.).
SIBAS state: RECOVERY
\<condition>¶
0: SCAN TO END OF R-LOG OR NUMBER OF CALLS
1: SCAN BUT REMOVE ALL CRITICAL SEQ STARTING AFTER TIME
2: SCAN UP TO A CHECKPOINT IDENTIFIED BY TIME OR LATER
3: SCAN UP TO A LOG-BLOCK WRITTEN BY TIME OR LATER
\<mode>¶
0: CONTINUE SCANNING
1: START REPROCESSING WITHOUT PRINT
2: START REPROCESSING AND PRINT
3: PRINT ONLY
4: PRINT ONLY SHORT MODE
\<number of calls>¶
0: MEANS ALL CALLS
\<print-option>¶
1: PRINT ONLY CANDIDATES TO REMOVE/INSERT
2: PRINT ALL CALLS
3: PRINT ONLY CHECKPOINTS AND EVERY 100 PAGE HEADER
4: PRINT BEGIN/END SEQUENCES AND CHECKPOINTS
\<run-id>¶
0: MEANS ALL RUN-ID'S
\<remove-flag = reinsert?>¶
NO : REMOVE CALLS DEFINED IN THE SET-CONDITION COMMAND
YES : REINSERT CALLS THAT HAVE EARLIER BEEN REMOVED
RETURN-CHECKPOINT¶
Define a checkpoint on log file(s) where the database is consistent. If a FATAL ERROR occurs at a later point in time, then the database can be restored to the consistent state when the last checkpoint was taken. "Before-image log" must be in use. SIBAS will return the time of the CHECKPOINT.
SIBAS state: RUNNING
ROLL-BACK \<password>\<basic unit>¶
\<second>\<minute>\<hour>\<day>\<month>\<year>
Reestablish the database state as it was at the last checkpoint. Before-image must be in use, otherwise the command will be ignored.
SIBAS state: RECOVERY
ND-30.009.03 EN
Page 79¶
SIBAS-II Operator's Manual¶
Appendix¶
RUN-DATABASE <new runflag?>¶
Change the SIBAS process from DBA to RUNNING state. The command may also be used to set or change the RUNFLAG. After each INIT-R-LOG command the RUNFLAG should be set. The RUNFLAG controls the recording of DML calls on the R-LOG. Normally all questions should be answered with carriage-return (no).
SIBAS state: RUNNING
SET-CONDITIONS-FOR-REPROCESSING <code>¶
Specify which DML calls on the Routine-log should be included in the reprocessing run. This must be done for each individual run-unit, unless code 7 is used. The reprocessing condition for each run-unit will be kept in a control table which will be used when the REPROCESS command is given. Note: If code 7 is wanted, this call must be executed in advance of rollback.
| Code | Description |
|---|---|
| 0 | RELEASE CONTROL TABLE ENTRY GIVEN BY RUN-ID |
| 1 | REMOVE A SEQ IDENTIFIED BY TIME AND RUN-ID |
| 2 | REMOVE ALL SEQ IDENTIFIED BY SEQ-NAME AND RUN-ID AFTER TIME |
| 3 | REMOVE ALL SEQ IDENTIFIED BY SEQ-NAME AND RUN-ID AFTER TIME |
| 4 | REMOVE ALL CALLS FOR THIS RUN-ID |
| 5 | REMOVE ALL CALLS FOR THIS RUN-ID FROM BEGIN SEQ-NAME |
| 6 | REMOVE ALL CALLS FOR THIS RUN-ID FROM BEGIN SEQ IDENT BY TIME |
| 7 | REMOVE UNCOMPLETED SEQUENCES FOR THIS RUN-ID OR ALL IF RUN-ID=0 |
SIBAS state: RECOVERY
SET-PASSIVE¶
Change the SIBAS process from READY to PASSIVE state.
SIBAS state: READY
SET-ROUTINE-LOGGING-ON/OFF <on/off>¶
Define the start or end of a section in which the R-logging is/is not in effect for this run-unit. Routine-log must be active, and RUNFLAG must permit this call (see RUN-DATABASE).
SIBAS state: RUNNING
SET-SIBAS-AVAILABLE¶
Allow the run-units to access (open) the databases again after they have been set unavailable with the SET-SIBAS-UNAVAILABLE command.
SIBAS state: RUNNING, DBA
ND-30.009.03 EN
Page 80¶
SIBAS-II Operator's Manual Appendix¶
SET-SIBAS-UNAVAILABLE¶
Prohibit run-units from opening the database. Run-units already with opened database can continue to run and access the database until they close the database.
- SIBAS state: RUNNING, DBA
STANDARD-REPROCESS <roll-back to last checkpoint?> <password>¶
Rollback (if Before-image log is in use) and reprocess to end of routine-log without print. If Before-image log is not in use, it is assumed that a BACKUP has been copied onto the database. Uncompleted sequences (if any) will be skipped. Default answer is YES (i.e. rollback).
- SIBAS state: RECOVERY
START-DATABASE <database owner> <database name>¶
To connect a database to a process.
- SIBAS state: READY
STOP-DATABASE¶
Change the SIBAS process from DBA to READY state.
- SIBAS state: DBA
STATUS¶
Same as DATABASE-STATUS, but no user entries will be displayed.
- SIBAS state: RUNNING, DBA, RECOVERY
SUPER-START <owner> <database-name> <open-for-update?> <password>¶
Change the SIBAS process from READY to RUNNING state and open the database.
- SIBAS state: READY
SUPER-STOP <force-close-all-users?>¶
Change the SIBAS process from RUNNING to PASSIVE state.
- SIBAS state: RUNNING
TURN-ON/OFF-TERMINAL-LOG <terminal-number> <mode>¶
Turn on/off internal tracing for a specified terminal number.
| Mode | Description |
|---|---|
| 0 | TERM-LOG OFF |
| 2 | TERM-LOG AND INTERNAL SIBAS TRACE ON |
- SIBAS state: DBA
ND-30.009.03 EN
Page 81¶
SIBAS-II Operator's Manual¶
Appendix¶
USER-STATUS¶
<userid (decimal), or CR if all users>
Gives all statistics and information available about one or all users with open database.
SIBAS state: RUNNING, DBA
ND-30.009.03 EN
Page 82¶
SIBAS-II Operator's Manual¶
Appendix¶
2 SIB2-LOOKLOG USER GUIDE¶
SIB2-LOOKLOG is a program to look at recorded DML-calls and checkpoints on a SIBAS-II routine-log file (R-LOG). It also has some search facilities.
The program is meant to be a tool for programmers, system supervisors and database administrators using SIBAS.
The user ought to have some knowledge of DML-calls and SIBAS routine logging.
SIB2-LOOKLOG can be helpful in many cases, for instance when errors appear while reprocessing the database. It can also help by tracing the course of execution of some transactions, either while debugging new applications or after production failures.
The user may list all calls in the log file or all calls within a defined area. S/he may also specify which DML-call(s) are to be listed by giving the name of the call and/or by giving user-id. The output from the program is normally the VDU (the terminal), but the output can also be duplicated on a file (a line-printer for example).
A DML-call will later be referred to as a SIBAS packet.
ND-30.009.03 EN
Page 83¶
2.1 Output Formats¶
A SIBAS packet can be presented in two different formats.
The Full Format: An Example.
| PAGE W | USERID | CALL | PARAMETERS | WRITTEN: 43 09:57:47 02.10.1985 |
|---|---|---|---|---|
| 16 354 | 00003 | SMDFY | 000000 000001 051501 046104 047525 052040 ...SALDOUT 000003 040013 161440 000000 006601 026405 ..@.. --- |
ANSWER 1 |
- Address: Log block no (BLOCK), and start position (W) (decimal).
- Userid: User identification used to identify the user to SIBAS
- DML call: Name of the DML call (5 characters).
- Time: Time and date when the log block was written (WRITTEN)
Basic time-unit Hour:minute:second day.month.year - Input parameters: Parameters will be displayed both in octal and character
form. Control characters will be displayed as dots "(.)".
(PARAMETERS) - Status: Returned status. (Not all calls will have the status logged)
(ANSWER) - Output parameters: Same as for input parameters
The Short Format: An Example.
| PAGE: 16 / 354 USERID: 00003 CALL: SMDFY ANSWER: 1 |
|-----------------------------------------------------|
- Address: Log block no (BLOCK), and start position (decimal).
- Userid: User identification used to identify the user to SIBAS
- DML -call: Name of the DML -call (5 characters).
- Status: Returned status. (Not all calls will have the status logged)
(ANSWER)
The Checkpoint Format
A checkpoint will always be displayed this way:
**** CHECKPOINT AT: 23 10:16:51 25.09.1985 PAGE/WORD: 10 295
ND-30.009.03 EN
Page 84¶
2.2 Running the SIB2-LOOKLOG¶
| SIB2-LOOKLOG asks for the log file: default type is .LOGG. | When SIB2-LOOKLOG is started, it will ask for the log file name. Default file type is .LOGG, but it is possible to specify other file types as well. If the program is not able to open the file, an error message will be written, and the program will again ask for the file name. |
|---|---|
| Database should be in READY or PASSIVE before you use SIB2-LOOKLOG. | Note that the database should be set in READY or PASSIVE state before SIB2-LOOKLOG can be used to investigate the R-LOG file. |
|---|---|
| The log file may be erroneous if the SIBAS process has been aborted. | If the actual SIBAS process has been aborted (not stopped in a controlled way), the index to the last log block might be erroneous. The program will then write the message "SCAN TO END OF LOG.." When the log file has been opened. This indicates that recovery should be performed. |
|---|---|
| SIB2-LOOKLOG has the same command syntax as in SINTRAN III. | The command syntax is similar to SINTRAN III, which means that commands can be abbreviated and parameters can be given in several ways. When a prompt character (">>") is written, it means that the program is ready to accept a command. |
|---|---|
| The HELP command | The HELP command will give a list of all commands or those commands specified. |
|---|---|
| The EXPLAIN command | The EXPLAIN command lists the parameters for a specified command and gives a short explanation. |
|---|---|
Running SIB2-LOOKLOG: An Example.
@SIB2-LOOKLOG
S I B A S I I, version F
SIB2-LOOKLOG, revision 00
LOG-FILE: FORDB:LOGG
>>
ND-30.009.03 EN
Page 85¶
2.3 The SIB2-LOOKLOG Commands¶
FIRST/LAST/NEXT/PREVIOUS
Find and display a SIBAS packet according to the command. If no packet is found, the message - NOT POSSIBLE - will be written.
DEFINE-AREA
Define an area on the log file
Example:
>>DEFINE-AREA
FIRST BLOCK (default=1) :5
LAST BLOCK (default=last) :6
The program will now see the log file as if it started in block no. 5, and ended in block no. 6.
This command will be practical if you have a large log file, and want to save time when searching for specified SIBAS packets, or if you want to list all packets between the limits.
SHORT-PRINT
Select output format. Normally short print will be off, and all SIBAS packets will be displayed in full format.
CALL-TABLE/CALL-SELECTION
A SIBAS packet which contains information about which DML call the packet describes. By manipulating a table named CALL-TABLE, it is possible to select some specific DML calls. The command CALL-SELECTION will tell the program whether it should scan in the call-table or not.
Note: A checkpoint can also be looked upon as a SIBAS packet, and it is identified in the call-table as "C-P".
Example:
>>CALL-TABLE
1: Insert call
2: Remove call
3: Clear table
CODE :1
CALL-NAME (Max 5 char.) :SGET
>>CALL-SELECT
ON=1 (default=OFF) :1
The commands FIRST/LAST/NEXT/PREVIOUS/LIST will now only display SGET calls.
Page 86¶
SIBAS-II Operator's Manual Appendix¶
USER-TABLE/USER-SELECTION¶
These commands work in the same way as CALL-TABLE/CALL-SELECTION. The commands make it possible to select some specific user-id’s.
STATUS¶
This command will give information about the current program status. The defined area, the content of the call-table and user-table will be displayed.
DELETE¶
This command will delete the last displayed SIBAS packet from the log file.
DEFINE-PRINT-FILE/ON-OFF-PRINTER¶
These commands make it possible to get a "hard copy" of the SIBAS-packets displayed on the terminal.
BLOCK-LIST¶
This command gives a list of all log blocks within the defined area, and contains information about number of packets in each block, the date and time when the log block was written, etc.
LIST¶
This command lists all SIBAS packets found within the defined area.
DATABASE-STATUS¶
This command gives information about the status of the log file.
EXIT¶
This command terminates the program.
ND-30.009.03 EN
Page 87¶
SIBAS-II Operator's Manual¶
Appendix¶
2.4 A Session with SIB2-LOOKLOG: An Example¶
@SIB-LOOKLOG-▯
S I B A S I I, version F
SIB2-LOOKLOG, revision 00
LOG-FILE: FORDB:LOGG-▯
▷▷HELP-▯
HELP
FIRST
LAST
NEXT
PREVIOUS
DEFINE-AREA
SHORT-PRINT
USER-SELECTION
CALL-SELECTION
USER-TABLE
CALL-TABLE
STATUS
DELETE
DEFINE-PRINT-FILE
ON-OFF-PRINTER
BLOCK-LIST
LIST
DATABASE-STATUS
EXIT
@-SPARE-COMMAND-NAME
EXPLAIN-COMMAND
▷▷DEFINE-AREA-▯
| FIRST BLOCK (default=1) | :2 |
| LAST BLOCK (default=last) | :4 |
▷▷CALL-TABLE-▯
| 1 | Insert call |
| 2 | Remove call |
| 3 | Clear table |
CODE :1-▯
CALL-NAME (Max 5 char.) :SGET
[continued...]
ND-30.009.03 EN
Page 88¶
CALL-SELECTION¶
ON=1 (default=OFF) :1
USER-TABLE¶
1: Insert user-id
2: Remove user-id
3: Clear table
CODE:1
USER-ID: 3
USER-SELECTION¶
ON=1 (default=OFF) :1
FIRST¶
| PAGE | USERID | CALL | PARAMETERS | WRITTEN: | 7 | 10:04:01 | 02.10.1985 |
|---|---|---|---|---|---|---|---|
| 2 | 16 | C00003 SGET | 000000 000001 046505 046502 042514 020040 | ...MEMBEL | |||
| 000000 000000 | ... | ||||||
| ANSWER | 2 | 000014 000014 |
NEXT¶
| PAGE | USERID | CALL | PARAMETERS | WRITTEN: | 7 | 10:04:01 | 02.10.1985 |
|---|---|---|---|---|---|---|---|
| 2 | 59 | O004953 SGET | 000000 000001 046505 046502 042514 020040 | ...MEMBEL | |||
| 000000 000000 | ... | ||||||
| ANSWER | 2 | 000015 000015 |
SHORT-PRINT¶
ON=1 (default=OFF) :1
PREVIOUS¶
PAGE: 2 / 16 USERID: C00003 CALL: SGET ANSWER: 2
LAST¶
PAGE: 4 / 478 USERID: C00003 CALL: SGET ANSWER: 2
STATUS¶
- CURRENT LOG-BLOCK: 4 AREA: 2 : 4
- USER-SELECT IS ON
- CALL-SELECT IS ON
USER-SELECT TABLE:
000003
CALL-SELECT TABLE:
SGET
ND-30.009.03 EN
Page 89¶
SIBAS-II Operator's Manual¶
Appendix¶
DEFINE-PRINT-FILE
File-Name: LINE-PRINTERON-OFF-PRINTER
ON:1 (default=OFF)LIST
| Page | UserID | Call | Answer |
|---|---|---|---|
| 2/16 | 000003 | SGET | 2 |
| 2/59 | 000003 | SGET | 2 |
| 2/231 | 000003 | SGET | 2 |
| 3/31 | 000003 | SGET | 2 |
| 3/461 | 000003 | SGET | 2 |
| 4/5 | 000003 | SGET | 2 |
| 4/435 | 000003 | SGET | 2 |
| 4/478 | 000003 | SGET | 2 |
EXIT
- EXIT -
ND-30.009.03 EN
Page 90¶
3 Description of Output from Database-Status¶
Current BIM page number
BIM trigger size (before C.P.)
Actual BIM log start
[page on BIM file where log starts]
BIM FILE-SIZE 1000 PGS; LOG START: 313 TRIGGER: 900 CURRENT: 407
Maximum BIM log size
Only given if database is open
Address on R-LOG (decimal), PAGE is page number, WORD is displacement inside this page
Address Table¶
| Page | Word | Year-MM-DD | Hour:Min:Sec | Basic-Units |
|---|---|---|---|---|
| CURRENT | 99 | 426 | 1986-02-26 | 12:56:03 |
| RLOG INIT/RESET | 4 | 4 | 1986-02-25 | 14:10:18 |
| DATABASE OPENED | 4 | 9 | 1986-02-26 | 12:53:21 |
| DATABASE CLOSED | 4 | 229 | 1986-02-26 | 12:53:04 |
| LAST CHECKPOINT | 4 | 420 | 1986-02-26 | 12:53:22 |
Current R-LOG address and current time (clock)
Address and time of last initiation/resetting of R-LOG
R-LOG address and time of last physical open and close of this database, time and address of latest checkpoint
Max R-LOG size in number of pages (1 Kwords pages)
Percent used out of maximum R-LOG size
R-LOG FILE-SIZE 1000 PAGES; 10 % IS USED;
Database owner
Database name
Total number of users with database open (read/update)
DATABASE (MPS-USER)FORDB IS OPENED BY 1 USERS (0/READ, 1/UPDATE)
Total number of SIBAS calls executed since START
(includes all calls executed by this SIBAS process)
TOTAL NUMBER OF SIBAS CALLS EXECUTED SINCE START: 42220
CALLS ON R-LOG 37393 RUNFLAG=002775B; LOG-TYPE: DIRECT
RUNFLAG (octal)
Number of SIBAS calls logged on the R-LOG
direct or circular
ND-30.009.03 EN
Page 91¶
SIBAS-II Operator's Manual¶
Appendix
User Statistics from DATABASE-STATUS:¶
Time when this user opened the database
| USERID | CPU | DEVICE | UPDATE | LOG | CALLS EXECUTED | ACTIVE TRANSACT. | OPEN TIME |
|---|---|---|---|---|---|---|---|
| 18 | 5028 | 49 I | NO | OFF | 7246 | BSEQU | 13:51:05 26.02 |
- Active BSEQU or SUEND (else blank)
- Total number of calls since open (this user)
- R-LOG is turned ON/OFF for this user
- Database opened for update by this user, YES/NO
- 'I' implies interactive user, 'R' an RT program, 'B' batch job and 'M' mode job
- Terminal number if interactive user, else RT description address (octal)
- ND CPU (machine) number where user/program is executing
- User identification (decimal)
For a more complete description of the user identification, please refer to section 2.4.1.1.
ND-30.009.03 EN
Page 92¶
I'm unable to convert this image to Markdown as it does not contain extractable content. Please provide an image with content that can be converted.
Page 93¶
SIBAS-II Operator's Manual¶
Index¶
| Topic | Page |
|---|---|
| Abnormal Close | 11 |
| Aborting SIBAS | 17 |
| Aborting SIBAS on ND-500 | 18 |
| BACKUP | 33, 39, 55 |
| BACKUP-FTX | 65 |
| BACKUP and LOGGING | 21 |
| BEFORE-IMAGE-LOG | 23 |
| BIM-LOG | 23, 30, 50 |
| Example | 31 |
| Size | 50 |
| BLOCK-LIST | 76 |
| CALL-SELECTION | 75 |
| CALL-TABLE | 75 |
| CHANGE-SIBAS-SYSTEM | 65 |
| Changing BIM-LOG | 50 |
| Changing R-Log Size | 49 |
| Changing Realm Size | 51 |
| Check SIBAS | 34 |
| Checking File Size | 48 |
| Checkpoints | 23 |
| CLOSE-DATABASE | 65 |
| Closing Database for All | 15 |
| Closing SIBAS for Batch Job | 14 |
| Closing SIBAS for Interactive User | 12 |
| Closing SIBAS for Mode Job | 14 |
| Closing SIBAS for One User | 12 |
| Closing SIBAS for RT-program | 14 |
| CONTINUE-FTX | 65 |
| Controlling SIBAS | 5 |
| Creating R-Log | 47 |
| Database | |
| Backup | 55 |
| Errors | 38 |
| Files | 45 |
| Recovery | 55 |
| Start | 6 |
| Statistics | 81 |
| DATABASE-STATUS | 65, 76, 80 |
| Database Control System | 5 |
| DEFINE AREA | 75 |
| DEFINE-PRINT-FILE | 76 |
| DELETE | 76 |
| Errors in Database | 38 |
| EXIT | 65, 76 |
| Explain SIB2-LOOKLOG | 74 |
| EXPLAIN-COMMAND | 65 |
| Files Maintenance | 45 |
| Files for Database | 45 |
| File Size | 48 |
| FINISH | 65 |
| FIRST/LAST/NEXT/PREVIOUS | 75 |
| FORCE-CLOSE | 11, 66 |
| FORCE-CLOSE Specific User | 14 |
ND-30.009.03 EN
Page 94¶
SIBAS-II Operator's Manual¶
Index¶
| Topic | Page |
|---|---|
| FREE-SPACE-STATISTICS | 66. |
| GET-SIBAS-STATE | 66. |
| GIVE-CHECKPOINT | 66. |
| GIVE-MESSAGE-TO-SIBAS | 66. |
| HELP | 65. |
| Increasing Realm Size | 51. |
| INITIATE-LOG | 67. |
| Initiating log file | 25. |
| LIST | 76. |
| LOGGING | |
| BIM-LOG | 31. |
| Facilities | 21. |
| Maintaining Files | 45. |
| OPEN-DATABASE | 67. |
| Operator | |
| Responsibility | 1. |
| Role | 1. |
| PAUSE | 67. |
| R-LOG | 22. |
| Creation | 47. |
| Resetting | 40. |
| Size | 47, 49. |
| Space | 48. |
| Realm Size | 48, 51. |
| RECOVER Command | 67. |
| Recovery | 55. |
| Recovery with BIM-LOG and R-LOG | 58. |
| Recovery with R-LOG | 56. |
| REPROCESS-DATABASE | 68. |
| Resetting R-LOG | 40. |
| RETURN-CHECKPOINT | 68. |
| ROLL-BACK | 68. |
| ROUTINE-LOG | 22. |
| RUN-DATABASE | 68. |
| Running SIB2-LOOKLOG | 74. |
| SET-CONDITIONS-FOR-REPROCESSING | 68. |
| SET-PASSIVE | 69. |
| SET-ROUTINE-LOGGING-ON/OFF | 69. |
| SET-SIBAS-AVAILABLE | 69. |
| SET-SIBAS-UNAVAILABLE | 69. |
| Setting RUNFLAG | 26. |
| SHORT-PRINT | 75. |
| SIB2-LOOKLOG | 72. |
| Commands | 75. |
| Session | 77. |
| SIBAS | |
| Control | 5. |
| Packets | 73. |
| Process | 5. |
| Verification | 34. |
| SIBAS-SERVICE | 63. |
| Commands | 64. |
| SIBAS-SERVICE Explain Command | 63. |
Page 95¶
SIBAS-II Operator's Manual¶
Index¶
| Topic | Page(s) |
|---|---|
| STANDARD-REPROCESS | 69 |
| START-DATABASE | 69 |
| Starting Database | 6 |
| Statistics Database | 81 |
| STATUS | 69, 76 |
| Database | 80 |
| STOP Command | 9 |
| STOP-DATABASE | 69 |
| Stopping | |
| Database | 9 |
| SIBAS | 9 |
| SUPER-START | 69 |
| SUPER-STOP | 16, 69 |
| Taking BACKUP | 33, 39 |
| TURN-ON/OFF-TERMINAL-LOG | 69 |
| USER-SELECTION | 76 |
| USER-STATUS | 69 |
| USER-TABLE | 76 |
| Verify Database | 34 |
ND-30.009.03 EN
Page 96¶
SEND US YOUR COMMENTS!!!¶
Are you frustrated because of unclear information in this manual? Do you have trouble finding things? Why don’t you join the Reader’s Club and send us a note? You will receive a membership card — and an answer to your comments.
Please let us know if you: - find errors - cannot understand information - cannot find information - find needless information
Do you think we could improve the manual by rearranging the contents? You could also tell us if you like the manual!
HELP YOURSELF BY HELPING US!!¶
| Manual name: SIBAS-II Operator's Manual | Manual number: ND–30.009.3 EN |
|---|---|
What problems do you have? (use extra pages if needed)
Do you have suggestions for improving this manual?
Your name: ____ Date: _______
Company: ______ Position: ___
Address: _____________
What are you using this manual for?
NOTE! This form is primarily for documentation errors. Software and system errors should be reported on Customer System Reports.
Send to:
Norsk Data A.S
Documentation Department
P.O. Box 25, Bogerud
0621 Oslo 6, Norway
Norsk Data's answer will be found on reverse side.
Page 97¶
Answer from Norsk Data¶
| Answered by | Date |
|---|---|
Norsk Data A.S
Documentation Department
P.O. Box 25, Bogerud
0621 Oslo6, Norway
Page 98¶
I'm unable to extract text from this image. Please provide a different image or additional content.