Hi,
We need to enable the supplemental logging for Oracle 8i tables. This is
used to tell Oracle, what are all the columns should be logged when the DMLs
are performed.
This can be done in 9i, using the following commands:
Database level:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
Table level:
ALTER TABLE T1 ADD SUPPLEMENTAL LOG GROUP T1_LOGGRP (col1, col2) ALWAYS;
(where col1 and col2 are primary keys of table T1).
But, the ALTER DATABASE and ALTER TABLE commands in 8i doesnt have these
clauses. There should be some other way to do this, but not sure how.
Example:
Assume the following query is applied on table T1:
"UPDATE T1 SET col3=100 WHERE col3=10;".
This will be logged in the log file as follows:
with SUPPLEMENTAL LOGGING enabled:
"UPDATE T1 SET col3 = 100 WHERE col1 = 'E001' AND col2 = 'Tom' AND col3 = 10 AND ROW-ID = '<row-id>';"
with SUPPLEMENTAL LOGGING disabled:
"UPDATE T1 SET col3 = 100 WHERE col3 = 10 AND ROW-ID = '<row-id>';"
tia,
madhes
We need to enable the supplemental logging for Oracle 8i tables. This is
used to tell Oracle, what are all the columns should be logged when the DMLs
are performed.
This can be done in 9i, using the following commands:
Database level:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
Table level:
ALTER TABLE T1 ADD SUPPLEMENTAL LOG GROUP T1_LOGGRP (col1, col2) ALWAYS;
(where col1 and col2 are primary keys of table T1).
But, the ALTER DATABASE and ALTER TABLE commands in 8i doesnt have these
clauses. There should be some other way to do this, but not sure how.
Example:
Assume the following query is applied on table T1:
"UPDATE T1 SET col3=100 WHERE col3=10;".
This will be logged in the log file as follows:
with SUPPLEMENTAL LOGGING enabled:
"UPDATE T1 SET col3 = 100 WHERE col1 = 'E001' AND col2 = 'Tom' AND col3 = 10 AND ROW-ID = '<row-id>';"
with SUPPLEMENTAL LOGGING disabled:
"UPDATE T1 SET col3 = 100 WHERE col3 = 10 AND ROW-ID = '<row-id>';"
tia,
madhes