B.8 Logging
Keeping data logs is a common practice to keep track of events. In essence, most database products provide built-in mechanisms to keep logs, in which the granularity can be configured via system settings.
Databases can be configured to log errors, crashes, and startup and shutdown events only. That would be a narrow scope of logging, so you can widen the scope as needed, up to the point where all table traffic is recorded.
Obviously, database logs have storage costs, so you should meticulously set up the appropriate logging strategy.
If you need a tailored log structure that the built-in logging mechanisms can’t handle, you can always create your custom log tables and fill them via triggers. Naturally, the lifecycle of such log ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access