[英]How can I know the last date I used insert trigger in SQL Server?
I need to get the last datetime
I used a particular insert trigger
only by system view
etc. 我需要获取仅通过system view
等使用特定insert trigger
的最后datetime
。
Pay attention that the date modified of the table isn't correct answer for my question because it includes also table update dates. 请注意,表的修改日期不是我所提问题的正确答案,因为它还包括表更新日期。
If you think that I need to improve my question please leave comment for me 如果您认为我需要改善我的问题,请给我留言
Thank you 谢谢
This method is only reliable when you are in full recovery model and have log backups.. 仅当处于完全恢复模式并具有日志备份时,此方法才可靠。
select [Begin Time], *
from sys.fn_dblog(null,null) where
AllocUnitName='yourtablename'
I don't think this is captured any where unless you have Auditing enabled. 我认为除非启用了审核,否则任何地方都不会捕获到此错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.