Tuesday, January 8, 2019

Oracle SYS.AUD$ performance issues, Apache Kafka come to rescue!


OK, we’ll continue about Oracle Database and Apache Kafka integration.
In which We describe very straight usage of Oracle Database as Apache Kafka producer.
Here we discuss how Apache Kafka can help in improving some pains while running
Oracle database.
Just to google for SYS.AUD$:
4470000 results and most of them are related to
592000 results about performance issues with SYS.AUD$!
Apache Kafka come to rescue!
Starting from Oracle Database  11g default options are:
audit_trail = db
audit_sys_operations = true
This produce lot of records in SYS.AUD$ table, fortunately starting from Oracle Database 12c this table
is in SYSAUX table space, Unified Auditing is introduced too. But this still generate contention in the same
database instance! We can disable audit_trail, but what to do if we must audit some actions or data
changes according to industry (PCI DSS for example) or government standards?
Solution is in setting audit destination to file system, watch this file system for changes and then transfer
audit files to Apache Kafka broker. This will consume CPU on database server only for file system
watching and transferring files to Kafka.
Source code and installation instructions are available at https://github.com/averemee-si/oraaud-kafka.
Using Kafka Streams or Kafka Consumers you can perform any analysis of audit information without
“eating” CPU and disk I/O of datab

No comments:

Post a Comment