問題描述
有沒有辦法自動告訴 SQL Server 所有表都應該有一個用于插入和更新的時間戳?
這樣做可能需要大量重復性工作?
或者有其他/更有效的方法來處理事務日志嗎?
看看AutoAudit>
這會將列添加到表中并創建 DML 觸發器來管理這些列以及維護審計跟蹤表
我發現它非常有用
當然可以使用 DDL 觸發器來嘗試強制執行表設計問題.還可以自動檢查元數據的設計氣味
Is there a way to automatically tell SQL Server that all tables should have a timestamp for insert and update?
That's probably a lot of repetitive work to do this?
Or is there another/more efficient way to do this with the transaction log?
Have a look at AutoAudit
This will add columns to a table and create DML triggers to manage those columns as well as maintain the audit trail table
I've found it to be very useful
It's certainly possible to use DDL triggers to attempt to enforce table design issues. It's also possible to automate checking the metadata for design smells
這篇關于如何跟蹤在 SQL Server 中自動創建/更新行的時間?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!