I do not know for sure if this behavior is documented, but I don't think so. I took a quick look at the documentation and could not find any mention of the row-level auditing being dropped when the table is altered.
I found out by running into this situation myself.
I touched on this in a presentation I did on Informix auditing. See slide 45 here:
https://advancedatatools.com/Downloads/InformixBestPractices-Auditing-MikeWalker.pdf I recommend there that you perform checks to make sure tables that you have set up for auditing are still being audited, and that it hasn't been dropped because somebody altered the table.
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com------------------------------
Original Message:
Sent: Mon December 12, 2022 03:38 PM
From: Snorri Bergmann
Subject: ALTER TABLE removes it from audit trail
Thanks Mike.
This is very confusing to say the least. Do you know if this behavior is documented somewhere?
Best regs,
-Snorri
------------------------------
Snorri Bergmann
Original Message:
Sent: Mon December 12, 2022 09:57 AM
From: Mike Walker
Subject: ALTER TABLE removes it from audit trail
This is the way it has been for years. When you alter a table previously defined as "with audit", the auditing of that table disappears. When you alter the table, you need to include ", add audit" again.
Whether a bug or a "feature" is debatable. It's certainly confusing as you would expect that the auditing would be retained after doing a simple alter. Maybe a feature request?
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com
Original Message:
Sent: Mon December 12, 2022 04:11 AM
From: Snorri Bergmann
Subject: ALTER TABLE removes it from audit trail
Hi.
Ran into a strange situation.
ALTER TABLE xxx ADD AUDIT;
Do a dbschema and the WITH AUDIT clause is present.
ALTER TABLE xxx ADD (c int); -- or whatever
Do a dbschema and the WITH AUDIT clause is gone.
Surely a bug? Newest version I tried this with is 14.10.FC7W1
Best regards,
-S
------------------------------
Snorri Bergmann
------------------------------
#Informix