Envers Audit tables location

  1. What is the best way to use envers in a different memory area ?
  2. How to have envers tables in a different table space?
  3. Is there option to have envers tables in a different database?

Is there option to have envers tables in a different database?

Yes, use the following properties to specify where the audit tables will be stored.

  • org.hibernate.envers.default_schema
  • org.hibernate.envers.default_catalog

How to have envers tables in a different table space?

The table spaces are configured at DB level, not Hibernate level.

What is the best way to use envers in a different memory area ?

I don’t understand this question.

1 Like

Hi Thank you Vlad for answers. 3rd question was not asked correctly probably. Using a table space or using a different database, which of these will be an efficient auditing solution.?

The answer does not depend on Envers, but on what database you are using and how you configure it.

Another alternative for logging, which an be even more efficient is to use Debezium and to parse the DB redo log. Check out this article for more details.

1 Like