Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-08-27 : 00:51:08
|
| Hi All,How can i get Date and Time when last time table was modified.Thanksmk_garg |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-08-27 : 01:03:54
|
| do you mean the last time data was inserted/updated/deleted or do you mean the last time the table definition changed? (added column, etc.)-ec |
 |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-08-27 : 01:13:22
|
| Last time data inserted/updated/deletedThanksmk_garg |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-08-27 : 01:26:57
|
| create a trigger, and update a summary table with that info. There is no other way that I know of.-ec |
 |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-08-27 : 01:30:25
|
| Thanks for thatmk_garg |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-08-27 : 01:34:12
|
| to elaborate a little bit more, I have a database where we have a requirement to track these types of changes.Our trigger grabs the username who made the change, the datetime and the before/after values (on an update). I think we also grab hostname or IP address, I'll have to look. ALso, we never perform an actual delete, we just mark a record inactive.-ec |
 |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-08-27 : 01:44:45
|
| Thanks ecmk_garg |
 |
|
|
|
|
|