The START-LOG statement is used to activate AFIM logging for the original database and to optionally define new volumes on which subsequent ALOG files are to be created.
START-LOG | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
DEFAULT-SUPPORT = *PUBLIC (...)
Any new ALOG file to be created will be created on public disk unless an explicit CREATE-FILE command is issued for the new ALOG file.
A specification other than *STD is only permitted for one of the operands CATID, VOLUME-SET or VOLUME.
The specifications are not checked for compatibility with the current UDS/SQL pubset declaration for the BMEND run. However, you must bear in mind that the specifications made here must be compatible with the UDS/SQL pubset declarations of the later application environments (DBH operation, utility routines).
CATID = *STD / *OWN / <catid>
Determines the catalog ID of the pubset.
CATID = *STD
The catalog ID is determined by the system from the specifications made in the VOLUME or VOLUME-SET operand. If nothing is specified for either of these operands or *STD was specified, the default catalog ID of the configuration user ID is used.
CATID = *OWN
The default catalog ID of the configuration user ID is used.
CATID = <catid>
The specified catalog ID is used.
VOLUME-SET = *STD / <catid>
Specifies the volume set of an SM pubset on which the ALOG file is to be configured. Non-privileged users can only specify volumes sets explicitly if they are authorized to perform physical allocations on the pubset concerned.
VOLUME-SET = *STD
The volume set for ALOG files on an SM pubset is selected by the system.
VOLUME-SET = <catid>
Explicit specification of the volume set on which the ALOG file is to be configured.
VOLUME = *STD / list-poss(15): <volume>
Specifies the public disks on which the ALOG file is to be configured.
VOLUME = *STD
The disks on which the ALOG file is configured are selected by the system.
VOLUME = list-poss(15): <volume>
A new ALOG file is created on the specified disks. These can be assigned to an SF pubset or to a volume set of an SM pubset. Up to 15 VSNs can be specified, no two of which may be the same. The VSN can be specified in PUB notation (PUBpxx) or in dot notation (pp[pp].[xy]z). All the disks specified must belong to the same volume set, i.e. they must have the same catalog ID. Non-privileged users may only use this specification if they are authorized to perform physical allocation of public storage space on the pubset concerned.
DEFAULT-SUPPORT = list-poss(15): *PRIVATE (...)
Any new ALOG file to be created will be created on the specified disk or disks unless an explicit CREATE-FILE command is issued for the new ALOG file. A maximum of 15 disks may be specified.
VOLUME = list-poss(15): <volume>
Specifies the private disks on which ALOG files can be created.
DEVICE = <device>
Defines the device type of the private disks.
DEFAULT-SUPPORT = *UNCHANGED
Existing values remain in effect. *UNCHANGED is only possible if logging has already been started.
RESERVE-SUPPORT = *PUBLIC (...)
The ALOG file will be created on public disk if no explicit specification for the new ALOG file to be created exists, and if the file cannot be created on the volumes specified with DEFAULT-SUPPORT.
A specification other than *STD is only permitted for one of the operands CATID, VOLUME-SET or VOLUME.
The specifications are not checked for compatibility with the current UDS/SQL pubset declaration for the BMEND run. However, you must bear in mind that the specifications made here must be compatible with the UDS/SQL pubset declarations of the later application environments (DBH operation, utility routines).
CATID = *STD
The catalog ID is determined by the system from the specifications made in the VOLUME or VOLUME-SET operand. If nothing is specified for either of these operands or *STD was specified, the default catalog ID of the configuration user ID is used.
CATID = *OWN
The default catalog ID of the configuration user ID is used.
CATID = <catid>
The specified catalog ID is used.
VOLUME-SET = *STD / <catid>
Specifies the volume set of an SM pubset on which the ALOG file is to be configured. Non-privileged users can only specify volumes sets explicitly if they are authorized to perform physical allocations on the pubset concerned.
VOLUME-SET = *STD
The volume set for ALOG files on an SM pubset is selected by the system.
VOLUME-SET = <catid>
Explicit specification of the volume set on which the ALOG file is to be configured.
VOLUME = *STD / list-poss(15): <volume>
Specifies the public disks on which the ALOG file is to be configured.
VOLUME = *STD
The disks on which the ALOG file is configured are selected by the system.
VOLUME = list-poss(15): <volume>
A new ALOG file is created on the specified disks. These can be assigned to an SF pubset or to a volume set of an SM pubset. Up to 15 VSNs can be specified, no two of which may be the same. The VSN can be specified in PUB notation (PUBpxx) or in dot notation (pp[pp].[xy]z). All the disks specified must belong to the same volume set, i.e. they must have the same catalog ID. Non-privileged users may only use this specification if they are authorized to perform physical allocation of public storage space on the pubset concerned.
RESERVE-SUPPORT = list-poss(15): *PRIVATE (...)
Any new ALOG file to be created will be created on the specified disk if the file cannot be created on the volumes specified with DEFAULT-SUPPORT.
VOLUME = list-poss(15): <volume>
Specifies the private disks on which ALOG files can be created.
DEVICE = <device>
Defines the device type of the private disks.
RESERVE-SUPPORT = *UNCHANGED
Existing values remain in effect. *UNCHANGED is only possible if logging has already been started.
If the DEFAULT and RESERVE operands are assigned the same value, an error occurs. This error is detected on creating the ALOG files, but not during the syntax analysis of the START-LOG statement. It is not possible to switch to an alternative medium.
SPACE = *STD
The new ALOG file to be created is assigned a primary allocation value of 192 and a secondary allocation value of 576.
SPACE = *RELATIVE (...)
The specified values are assigned as primary and secondary allocations for the new ALOG file to be created. (The values specified here must be >=
192 and <=
50331645 for the primary allocation, and >=
576 and <=
32767 for the secondary allocation.)
PRIMARY-ALLOCATION = <integer 192..50331645>
Number of PAM pages for the primary allocation.
SECONDARY-ALLOCATION = <integer 576..32767>
Number of PAM pages for the secondary allocation.
SPACE = *UNCHANGED
Existing values remain in effect. *UNCHANGED is only possible if logging has already been started.
USER-ACCESS = *OWNER-ONLY
Restricts access to the ALOG file to the user ID under which it was created.
USER-ACCESS = *ALL-USERS
Permits the ALOG file to be accessed by other user IDs as well.
RESET-LOG-POOL = *NO
The new ALOG file is created with an ALOG sequence number that is obtained by incrementing the ALOG SEQ NR from the Act-Key-0 of the DBDIR by 1.
RESET-LOG-POOL = *YES
The ALOG file begins with ALOG SEQ NR =1.
This operand is typically used to create the log pool of a duplicated database - starting with ALOG SEQ NR = 1.
You can specify up to 15 disks in a PRIVATE operand and up to 15 variants of the PRIVATE operand. However, if the number of disks that are specified in a statement exceeds 15, the last 15 entries apply.
This means that it is only worthwhile specifying multiple variants of the PRIVATE operand if the disks are assigned to different device types.
If an ALOG file cannot be accessed (because it was deleted, for example), a new ALOG file with an ALOG sequence number incremented by 1 is created by the utility routine. If the deleted ALOG file had no relevant information (no deviation from consistency point), the update could be applied in two steps despite the logging gap produced as a result of the deletion (step 1 up to the gap; step 2 after it).
Example
Activate AFIM logging and the online backup capability. New ALOG files are to be created on different public disks.
/ASSIGN-SYSDTA TO-FILE=*SYSCMD /SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL, VERSION=02.67A00 /START-UDS-BMEND ***** START BMEND (UDS/SQL V2.8 0000 ) 2015-09-18 09:54:50 //ALLOCATE-BUFFER-POOL BUFFER-SIZE=*STD //OPEN-DATABASE DATABASE-NAME=SHIPPING ***** DATABASE ORIGINAL WITHOUT AFIM LOGGING FUNCTION ENABLE NOT AVAILABLE FUNCTION KILL NOT AVAILABLE ***** CONSISTENT DATABASE DIRECTORY //START-LOG DEFAULT-SUPPORT=*PUBLIC(CATID=*OWN), - // RESERVE-SUPPORT=*PUBLIC(CATID=SQL2), - // SPACE=*STD,RESET-LOG-POOL=*NO ***** LOGGING WILL BE ACTIVATED FUNCTION ENABLE AVAILABLE FROM NOW ON //ENABLE-ONLINE-COPY //END ***** BEGIN FUNCTION START LOGGING AT 09:54:50 ALOG FILE CREATED ACCORDING TO DEFAULT-SUPPORT ***** NORMAL END FUNCTION START LOGGING AT 09:54:50 ***** BEGIN FUNCTION ENABLE ONLINE COPY AT 09:54:50 ***** ONLINE COPY FOR DATABASE $XXXXXXXX.SHIPPING ALLOWED ***** NORMAL END FUNCTION ENABLE ONLINE COPY AT 09:54:50 ***** DIAGNOSTIC SUMMARY OF BMEND NO WARNINGS NO ERRORS NO SYSTEM-ERRORS ***** END OF DIAGNOSTIC SUMMARY ***** NR OF DATABASE ACCESSES : 147 ***** NORMAL END BMEND (UDS/SQL V2.8 0000 ) 2015-09-18 09:54:50
Reset the ALOG SEQ NR to 1 and specify three disks of the same device type on which new ALOG files can be subsequently created.
/ASSIGN-SYSDTA TO-FILE=*SYSCMD /SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL,VERSION=02.8A00 /START-UDS-BMEND //OPEN-DATABASE DATABASE-NAME=dbname //START-LOG - // DEFAULT=*PRIVATE(VOLUME=(G3200A,G3200B,G3200C),- // DEVICE=D3468) ,- // RESERVE=*PRIVATE(VOLUME=G3400A ,- // DEVICE=D3468) ,- // RESET-LOG-POOL=*YES //END ***** BEGIN FUNCTION START LOGGING AT timestamp ***** NORMAL END FUNCTION START LOGGING AT timestamp
Assign three disks of different device types on which new ALOG files can be subsequently created.
/ASSIGN-SYSDTA TO-FILE=*SYSCMD /SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL,VERSION=02.8A00 /START-UDS-BMEND //OPEN-DATABASE DATABASE-NAME=dbname //START-LOG DEFAULT=(*PRIVATE(VOLUME=G3030M, ,- // DEVICE=D3468) ,- // *PRIVATE(VOLUME=(G2065C,G2065D) ,- // DEVICE=D5804) ),- // RESERVE=*PUBLIC //END ***** BEGIN FUNCTION START LOGGING AT timestamp ***** NORMAL END FUNCTION START LOGGING AT timestamp
timestamp indicates the current time.