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 |
mmssi
Starting Member
5 Posts |
Posted - 2005-01-28 : 16:00:22
|
how can i find the last time a database in sql was modified or written records to. |
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-01-28 : 19:24:45
|
You would need to have the database in full recovery mode; and you would need to use a tool like Lumigent Log Explorer. If this is something you need ongoing, you could use a tool like Profiler; however, it would be extremely hard on the server to track every transaction. The best thing to do is design the database to properly track when modifications happen in the first place.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-02 : 05:52:08
|
[code]SELECT so.name ObjectName, so.type ObjectType, max(convert(datetime, l.[Begin Time])) LogTimeFROM ::fn_dblog (DEFAULT, DEFAULT) linner join sysobjects so on so.name = l.[transaction name]--where so.type = 'u'group by so.name, so.typeorder by so.name, so.type[/code]Peter LarssonHelsingborg, Sweden |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-08-02 : 05:56:37
|
nice one peso.Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-21 : 00:33:05
|
Peso, can you highlight the change you made?MadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-21 : 00:42:16
|
Have I done any change?Peter LarssonHelsingborg, Sweden |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-21 : 01:18:53
|
It seems. Didnt you edit your reply on 2006-08-18? MadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-21 : 02:15:43
|
The only thing that come into mind, could be the spacing between my signature and the code itself.I sometimes go back and edit my messages, but that is most often due to spelling mistakes.If I change in the code, I mark that with a color and write a note about it, or simply repost.Or simply I didn't remember to check "Subscribe" checkbox?Peter LarssonHelsingborg, SwedenEDIT: Last sentence with remember. |
 |
|
|
|
|
|
|