活动SQL Server 2005数据库的最后修改日期(Last modification date for a live SQL Server 2005 database)

编程入门 行业动态 更新时间:2024-10-27 06:32:59
活动SQL Server 2005数据库的最后修改日期(Last modification date for a live SQL Server 2005 database)

有没有办法知道在活动SQL Server 2005数据库中最后一次写入操作发生的时间?

我目前在我的服务器上有30个(和不断增长的)数据库。 其中只有一些会看到日常活动(但哪些日常活动会随着时间的推移而变化)。我的备份空间有限,我希望每日备份所有“自上次备份后修改”的数据库。

事实上,我在问这个问题的反面。 我不想从备份中询问最后一次写入日期以查看是否应该恢复它,而是要告诉最后写入数据库的日期以查看是否应备份它。

由于备份在服务器上运行,我可以检查日志的最后修改时间,但这不是很干净,也不确定是完全可靠的。

Is there a way to know when the last write operation has occurred in a live SQL Server 2005 database?

I currently have 30 (and growing) databases on my server. Only some of these see daily activity (but which ones get daily activity varies over time.) My backup space is limited and I'd like to do a daily backup of all "modified since last backup" databases.

In fact, I'm asking the reverse of this question. Instead of asking last write date from a backup to see if I should restore it, I want to tell last write date of a live database to see if I should back it up.

Since the backups run on the server itself, I could check the last modification time of the log, but that isn't very clean, nor I'm sure is totally reliable.

最满意答案

本博客条目包含有关如何在SQL Server 2008和2005上执行此操作的信息。

在2008年:使用新的服务器审计功能 在2005年:使用动态管理视图(DMV)

This Blog entry contains information on how to do it on SQL Server 2008 and 2005.

On 2008: using the new Server Auditing feature On 2005: using Dynamic Management Views (DMV)

更多推荐

本文发布于:2023-08-07 08:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1463331.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期   数据库   Server   SQL   date

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!