Effective strategy for leaving an audit trail/change history for DB applications?

后端 未结 6 1641
有刺的猬
有刺的猬 2020-12-13 14:22

What are some strategies that people have had success with for maintaining a change history for data in a fairly complex database. One of the applications that I frequently

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 15:17

    I use SQL Server, not PostgreSQL, so I'm not sure if this will work for you or not, but Pop Rivett had a great article on creating an audit trail here: Pop rivett's SQL Server FAQ No.5: Pop on the Audit Trail

    Build an audit table, then create a trigger for each table you want to audit.

    Hint: use Codesmith to build your triggers.

提交回复
热议问题