Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Maintaining ALOG files

&pagelevel(4)&pagelevel

Database backups contain the data as it was when the database was saved. In order to be able to reconstruct the most recent status of the data as possible in the event of an error, it is also necessary to record the changes made between backup times. UDS/SQL logs the changes (after-images) made to data in the ALOG file. The ALOG file is database-specific and has the name

dbname.A.alog-seq-no

dbname

Name of the database

alog-seq-no

Nine-digit sequence number of the ALOG file

You must specify that changes are to be logged in the ALOG file by using the BMEND utility routine (START-LOG/STOP-LOG statements) before the start of database operation. If this has not already been done, an ALOG file is created and initialized when START-LOG is issued.

You can create the ALOG file yourself by using the command

CREATE-FILE ...PROTECTION=*PAR(...,USER-ACCESS=*ALL-USERS,...). This is necessary if the DBH is not started under the database user ID, since the DBH cannot create ALOG files under any foreign user ID, but always expects ALOG files under the database user ID on disk.

If AFIM logging is activated, the DBH rejects updating transactions until an ALOG file is available.

Switching the ALOG file

The BMEND utility routine can be used to apply completed ALOG files to a database backup status in order to generate an updated and consistent backup status.

An ALOG file is completed normally only when an ALOG file switch takes place. If AFIM logging is activated, the ALOG file is switched in the following cases:

  • The DBH load parameter PP STDCKPT=YES is specified, and the DBH was terminated normally after you performed updates.

  • The DBH load parameter PP STDCKPT=YES is specified, and a restart was performed successfully.

  • The DBH load parameter PP STDCKPT=YES is specified, and an ALOG file containing a log interval that is not empty is available at the start of the session.

  • The DAL command CHECKPOINT is executed.

  • An ALOG file overflow occurs.

  • An updating utility routine is terminated.

  • An updating utility routine is started, and an ALOG file containing a log interval that is not empty is available.

  • The BMEND statement STOP-LOG is specified, and an ALOG file containing a log interval that is not empty is available.

When a database is detached from the current session (DROP DB) or when a DBH session is terminated with PP STDCKPT=NO, the ALOG file is not switched and is therefore also not completed.

Regardless of whether or not AFIM is activated, the BMEND statement START-LOG switches the ALOG file in the following cases:

  • The current ALOG file is not available.

  • The current ALOG file already contains a log interval that is not empty.

  • The current ALOG file was terminated in an inconsistent state.

Whenever the ALOG file is switched, the internal sequence number of the current ALOG file is incremented by 1.