You can use the END LOGGING statement to terminate access logging on any user, action, or object for which one or more logging rules are currently active.
An END LOGGING statement generates an error if a corresponding BEGIN LOGGING statement is not currently in effect for the database name specified in the END LOGGING statement.
Also consider the following END LOGGING characteristics:
- You cannot omit the BY username clause to apply the END LOGGING to all users.
- The END LOGGING statement terminates access logging on the database objects included in the statement. If the END LOGGING statement terminates all logging rules for a particular user, database, or object, the system deletes the row from DBC.AccLogRuleTbl.
To disable access logging:
- Query the DBC.AccLogRules view to display the list of BEGIN LOGGING statements currently in effect:
SELECT * FROM DBC.AccLogRulesV;
- Submit an END LOGGING statement for each BEGIN LOGGING statement in the list that you want to end.
- Issue a DROP MACRO statement for DBC.AccLogRule macro if you are ending all logging.If you do not issue an END LOGGING statement for every rule in DBC.AccLogRules, access logging continues even if you drop the DBC.AccLogRule macro and reset the database.
- Execute the tpareset command to set the change.
For information on use of the tpareset command, see Utilities.