0

I need to get the last datetime I used a particular insert trigger only by system view etc.

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ron
  • 1
  • 6

1 Answers1

0

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.

TheGameiswar
  • 27,855
  • 8
  • 56
  • 94
  • And even this is only somewhat reliable because it would record the last time an insert happened, if the trigger was disabled you could get false positives. Still a good answer. – Sean Lange Feb 02 '18 at 14:17