Questions tagged [audit-tables]

73 questions
35
votes
6 answers

@CreatedDate annotation does not work with mysql

I am new to spring and I am confused how @CreatedDate annotation works in an entity. I did a google search and there were many solutions, but none of them worked for me except one. I am confused why? This is what I tried first…
Fawzan
  • 4,738
  • 8
  • 41
  • 85
13
votes
3 answers

How to design a SQL db with undo-redo?

I'm trying to figure out how to design my DB tables to allow Undo-Redo. Pretend you have a tasks table with the following structure: id title memo date_added date_due Now assume that over a few days…
brian h
  • 1,633
  • 3
  • 12
  • 15
10
votes
4 answers

How to delete entries from my audit table?

I am currently working with Hibernate Envers. How to delete entries in the audit table related to the entity I want to delete? My entity has no relation with other entities. I figured out that I have to do that in onPostDelete method of my custom…
Laurent T
  • 1,070
  • 4
  • 13
  • 25
9
votes
4 answers

Advice for minimizing locking on an append only table in MS SQL Server?

I'm writing some logging/auditing code that will be running in production (not just when errors are thrown or while developing). After reading Coding Horror's experiences with dead-locking and logging, I decided I should seek advice. (Jeff's…
MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
8
votes
1 answer

Node library for Sequelize audit trail

Is there a proper Node library to enable audit tables with the Sequelize ORM (Postgresql under the hood)? I found the NPM packages sequelize-temporal, sequelize-paper-trail and audit.sequelize, but they are either very old, don't provide an easy way…
8
votes
2 answers

Data change history with audit tables: Grouping changes

Lets say I want to store users and groups in a MySQL database. They have a relation n:m. To keep track of all changes each table has an audit table user_journal, group_journal and user_group_journal. MySQL triggers copy the current record to the…
stofl
  • 2,950
  • 6
  • 35
  • 48
5
votes
1 answer

"audit create session by session" vs. "audit create session by access"?

When I enabling auditing for create session by the following way: audit create session by session; Then I am querying the following: select * from dba_priv_audit_opts; The result is: USERNAME | PROXY_NAME | AUDIT_OPTION | SUCCESS | FAILURE …
kupa
  • 1,861
  • 5
  • 25
  • 41
5
votes
1 answer

Envers: How to add a new column in *_AUD table (not in REVINFO table)

For each audited entity, envers create a table with *_AUD suffix. Each table has TWO extra columns ( REV and revtype). I just want to dynamically create a new one column to fulfill my extra needs. Obs: Manually create the new column as a new filed…
CelinHC
  • 1,857
  • 2
  • 27
  • 36
5
votes
1 answer

How to get row count of audit table using hibernate envers

In audit table, there is not such a Criteria that we could use Criteria.setProjection(Projections.rowCount()) to get the row count of the query. We could use AuditQuery to do similar things. But I couldn't find how to set projections in this case.…
4
votes
1 answer

Data history tracking best practice

we need to keep track of data modification during the time on some table. We need some advice about how to achieve this task. We have two streets to follow in our mind. 1) Create a table with the following records: userid, date modification,…
Angelo Badellino
  • 2,141
  • 2
  • 24
  • 45
4
votes
0 answers

@CreatedDate is not working, but @UpdatedDate is working for the first save

I have tried to use @CreatedDate and @LastModifiedDate. While @LastModifiedDate works fine but @CreatedDate is not. I have added @EnableMongoAuditing in main application configuration file. mainapplication.java public class Application { public…
Raghu
  • 43
  • 6
3
votes
0 answers

Hibernate Envers: should dropped columns from the entity be dropped in the audit/history table as well?

If an entity has a column that will be dropped (or in general renamed or changed) with the next release, is it good practice to keep the column in the audit table? If so, over time, this will eventually grow and grow as your entity model changes.…
Thomas Stubbe
  • 1,945
  • 5
  • 26
  • 40
3
votes
1 answer

EF2.2 Core 2.2 Auditing returns same old and new value how to fix?

I am trying to implement an Audit table in my .net core (2.2) using EF 2.2 code first. My intention is to log all changes made in my entities I was following this blog post to implement. Everything seems fine but I am getting same old and new…
user2019
  • 187
  • 1
  • 4
  • 16
3
votes
0 answers

How to implement merkle tree data in a relational database table to validate the records in the database table

I have a REST service which insert the audit record into the database say MySQL. I have to implement merkle tree in such a way that whenever the service insert the record in database it should verify the the table records and insert the data. Or, if…
3
votes
2 answers

Updating a table (with audit trigger using Service Broker) in a Transaction

We have implemented Auditing capability using service broker and have implemented triggers on the tables that need to be audited. The issue we are facing is when we try to update an auditable table from within a transaction, it throws up an error -…
Vikram
  • 6,865
  • 9
  • 50
  • 61
1
2 3 4 5