問題描述
有沒有辦法自動告訴 SQL Server 所有表都應(yīng)該有一個用于插入和更新的時間戳?
這樣做可能需要大量重復(fù)性工作?
或者有其他/更有效的方法來處理事務(wù)日志嗎?
看看AutoAudit>
這會將列添加到表中并創(chuàng)建 DML 觸發(fā)器來管理這些列以及維護(hù)審計跟蹤表
我發(fā)現(xiàn)它非常有用
當(dāng)然可以使用 DDL 觸發(fā)器來嘗試強制執(zhí)行表設(shè)計問題.還可以自動檢查元數(shù)據(jù)的設(shè)計氣味
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
這篇關(guān)于如何跟蹤在 SQL Server 中自動創(chuàng)建/更新行的時間?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!