Control history collection for users
A user is set to collect history based on the following:
- Session user
- Groups the session user belongs to
- The connected database
The user setting is based on the following:
- If the COLLECT HISTORY command of a user is explicitly set, that is the user setting.
- If the COLLECT HISTORY command of a user is not set, then the groups to which the user belongs are examined.
- If the groups of a user are not set, then the setting defaults to COLLECT HISTORY ON.
- If any of the groups of a user is set to COLLECT HISTORY ON, then the setting is COLLECT HISTORY ON.
- Otherwise, the setting is COLLECT HISTORY OFF.
With these rules, you can avoid collecting history on operations against a development or test database, while allowing identified users (or users in an identified group) to have their work audited.
Thus groups can be used as roles. For example, a GROUP might be granted update access on a table and also be set to collect history. A different group might be created for table readers that does not collect history.