Primary data
Using the record specifications already described, the primary data changes made are output attribute by attribute.
Example
In the following example some common data types are used.
(The title line was repeated for the sake of clarity).
USER IDENTIFICATION TA ID STMT ACTION SPC TAB REC NR D016ZE09TSN=3Q2QDSQL 0000000B 00000004 INSERT 2 13 00000001 BAN: 0001 SAN: AAA POS#: FCT: N VAL: 1 F1404040404040404040 0002 AAB 0 A C1404040404040404040 0003 AAC 0 B 0042404040404040404040404040404040404040 0004 AAD 0 1 6 . 3 01630F 0005 AAE 0 1 6 . 3 F0F1F6F3F0 0006 AAF 0 2 0 0 6 000007D6 0007 AAG 0 2 0 0 6 07D6 0008 AAH 0 9 . 8 E 7 475D75C8 0009 AAJ 0 9 . 8 E 7 475D75C800000000 000A AAK 0 9 . 8 E 7 475D75C800000000 9001 0 D 0 U S E R C4F0E4E2C5D9404040404040404040404040 D016ZE09TSN=3Q2QDSQL 0000000C 00000007 UPDATE 2 13 00000001 BAN: 0001 SAN: AAA POS#: FCT: - VAL: 1 F1404040404040404040 000C AAM 0 1 0 : 4 4 : 3 4 . 3 7 0 000A002C00220172 D016ZE09TSN=3Q2QDSQL 0000000D 00000009 DELETE 2 13 00000001 BAN: 0001 SAN: AAA POS#: FCT: - VAL: 1 F1404040404040404040
Explanation
|
Representing primary data
The individual values of a logged modification to primary data are output in both printable and hexadecimal format, e.g. (data type CHARACTER (VARYING)):
SAN: AAAPOS#: |
|
Non-printable data appears as blanks and in its hexadecimal representation.
Printable data of the data types NATIONAL CHARACTER (VARYING) is converted with the CCSN EFD041 to CHARACTER format and output. Data that cannot be converted appears as blanks. Hexadecimal output in the continuation line corresponds to the Unicode encoding form UTF-16, e.g.:
SAN: AAAPOS#: |
|
Secondary data
Secondary data changes are not output!
Transaction borders
All changes made to the affected user are committed or rolled back at a transaction border. Internally the result of the transaction is logged in two steps: If identical transaction IDs (TA_ID) appear, then the transaction is considered to be committed, but if they do not appear, the transaction is considered to be rolled back. This information is presented clearly in the SEDI70 log so that a conclusion can be reached even when files are exchanged between the two steps.
Example
D016ZE09TSN=3Q2QDSQL ========> PREPARE TO COMMIT (TA ID: 00000000D) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000005, TIME: <date> <time> LOC) D016ZE09TSN=3Q2QDSQL ========> ROLLBACK WORK (TA ID: 00000000D)
Canceling a statement
When a statement is canceled, all changes with the corresponding statement identification are rolled back (due to SQL state, INTR CANCEL).
Examples
Of a cancellation:
D016ZE09TSN=3Q2QDSQL 0000000E =====> CANCEL STATEMENT
Of the normal termination of a statement (only for the option NOTAS):
D016ZE09TSN=3Q2QDSQL 0000010B =====> END OF STATEMENT
DDL statements
Logging is done using an internal representation. The data is attempted to be formatted similar to SQL statements. The ALTER SPACE statement always appears when the metadata of a space is changed. It is used to modify the space timestamp. The space timestamp is used to check the consistency against the metadata in the catalog space.
Examples of DDL statements that affect the user space
a) CREATE TABLE
D016ZE09TSN=3Q2QDSQL 00000002 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 00000002 CREATE TABLE (TABLE ID = 13) USING SPACE SPACE1 (SPACE ID = 2) D016ZE09TSN=3Q2QDSQL 00000002 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time> D016ZE09TSN=3Q2QDSQL 00000002 ALTER TABLE (TABLE ID = 13, SPACE ID = 2) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN PKEY ( BAN = 0001, SAN = AAA ) CHARACTER(10) PRIMARY KEY D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN CHAR01 ( BAN = 0002, SAN = AAB ) CHARACTER(10), D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN NCHAR13 ( BAN = 0003, SAN = AAC ) NATIONAL CHAR(10) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN DECI02 ( BAN = 0004, SAN = AAD ) DECIMAL(5,2) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN NUMI03 ( BAN = 0005, SAN = AAE ) NUMERIC(5,2) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN INT04 ( BAN = 0006, SAN = AAF ) INTEGER(31) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN SMALL05 ( BAN = 0007, SAN = AAG ) SMALLINT(15) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN REAL07 ( BAN = 0008, SAN = AAH ) REAL(21) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN DOUBLE08 ( BAN = 0009, SAN = AAJ ) DOUBLE PRECISION(53) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN FLOAT09 ( BAN = 000A, SAN = AAK ) FLOAT(50) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN DATE10 ( BAN = 000B, SAN = AAL ) DATE D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN TIME11 ( BAN = 000C, SAN = AAM ) TIME D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN TIME12 ( BAN = 000D, SAN = AAN ) TIMESTAMP D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN VARCHAR06 ( BAN = 9001 ) CHARACTER VARYING(300) D016ZE09TSN=3Q2QDSQL 00000002 ADD COLUMN NVARCHAR14 ( BAN = 9002 ) NATIONAL CHAR VARYING(300) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000005)
b) ALTER TABLE ADD COLUMN
D016ZE09TSN=3Q2QDSQL 0000000D ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 0000000D ALTER TABLE (TABLE ID = 13, SPACE ID = 2) D016ZE09TSN=3Q2QDSQL 0000000D ADD COLUMN NCHAR10 ( BAN = 000E, SAN = AAP ) NATIONAL CHAR(10) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 00000000F)
c) ALTER TABLE ALTER COLUMN
D016ZE09TSN=3Q2QDSQL 0000000F ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 0000000F ALTER TABLE (TABLE ID = 13, SPACE ID = 2) D016ZE09TSN=3Q2QDSQL 0000000F ALTER COLUMN ( BAN = 0006, SAN = AAF ) NATIONAL CHAR(20) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000010)
d) ALTER TABLE DROP COLUMN
D016ZE09TSN=3Q2QDSQL 00000011 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 00000011 ALTER TABLE (TABLE ID = 13, SPACE ID = 2) D016ZE09TSN=3Q2QDSQL 00000011 DROP COLUMN ( BAN = 0006, SAN = AAF ) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000014)
e) DROP TABLE
D016ZE09TSN=3Q2QDSQL 00000012 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0001, SAN = AAA ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0002, SAN = AAB ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0003, SAN = AAC ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0004, SAN = AAD ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0005, SAN = AAE ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0006, SAN = AAF ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0007, SAN = AAG ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0008, SAN = AAH ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 0009, SAN = AAJ ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 000A, SAN = AAK ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 000B, SAN = AAL ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 000C, SAN = AAM ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 000D, SAN = AAN ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 9001 ) D016ZE09TSN=3Q2QDSQL 00000012 DROP COLUMN ( BAN = 9002 ) D016ZE09TSN=3Q2QDSQL 00000012 DROP TABLE ( TABLE-ID = 13 ) USING SPACE SPACE1 ( SPACE-ID = 2 ) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000011)
f) Possible data types for ADD COLUMN
D016ZE09TSN=3Q2QDSQL 00000013 ADD COLUMN CHAR011 ( BAN = 0006, SAN = AAF ) CHARACTER(10), D016ZE09TSN=3Q2QDSQL 00000014 ADD COLUMN NCHAR113 ( BAN = 000F, SAN = AAQ ) NATIONAL CHAR(10) D016ZE09TSN=3Q2QDSQL 00000015 ADD COLUMN DECI102 ( BAN = 0010, SAN = AAR ) DECIMAL(5,2) D016ZE09TSN=3Q2QDSQL 00000016 ADD COLUMN NUMI103 ( BAN = 0011, SAN = AAS ) NUMERIC(5,2) D016ZE09TSN=3Q2QDSQL 00000017 ADD COLUMN INT104 ( BAN = 0012, SAN = AAT ) INTEGER(31) D016ZE09TSN=3Q2QDSQL 00000018 ADD COLUMN SMALL105 ( BAN = 0013, SAN = AAU ) SMALLINT(15) D016ZE09TSN=3Q2QDSQL 00000019 ADD COLUMN REAL107 ( BAN = 0014, SAN = AAV ) REAL(21) D016ZE09TSN=3Q2QDSQL 0000001B ADD COLUMN FLOAT109 ( BAN = 0015, SAN = AAW ) FLOAT(50) D016ZE09TSN=3Q2QDSQL 0000001C ADD COLUMN DATE110 ( BAN = 0016, SAN = AAX ) DATE D016ZE09TSN=3Q2QDSQL 0000001D ADD COLUMN TIME111 ( BAN = 0017, SAN = AAY ) TIME D016ZE09TSN=3Q2QDSQL 0000001E ADD COLUMN TIME112 ( BAN = 0018, SAN = AAZ ) TIMESTAMP D016ZE09TSN=3Q2QDSQL 0000001F ADD COLUMN VARCHAR106 ( BAN = 9003 ) CHARACTER VARYING(300) D016ZE09TSN=3Q2QDSQL 00000020 ADD COLUMN NVARCHAR114 ( BAN = 9004 ) NATIONAL CHAR VARYING(300)
SSL statements
Logging is done using an internal representation. The data is attempted to be formatted similar to SQL statements.
Example
a) CREATE SPACE
D016ZE09TSN=3Q2QDSQL 00000027 CREATE SPACE SPACE25 (SPACE ID = 6) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000016)
b) DROP SPACE
D016ZE09TSN=3Q2QDSQL 00000029 DROP SPACE SPACE25 (SPACE ID = 6) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 00000001A)
c) CREATE INDEX
D016ZE09TSN=3Q2QDSQL 00000023 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 00000023 CREATE INDEX (INDEX ID = 35) ON TABLE (TABLE ID = 13, SPACE ID = 2) USING SPACE SPACE1 (SPACE ID = 2) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000013)
d) DROP INDEX
D016ZE09TSN=3Q2QDSQL 00000025 ALTER SPACE (SPACE ID = 2, TIMESTAMP= <date> <time>) D016ZE09TSN=3Q2QDSQL 00000025 DROP INDEX (INDEX ID = 34) ON TABLE (TABLE ID = 13, SPACE ID = 2) USING SPACE SPACE1 (SPACE ID = 2) D016ZE09TSN=3Q2QDSQL ========> COMMIT WORK (TA ID: 000000014)