SQL Server数据库上次更新日期时间 [英] SQL Server database last updated date time

查看:395
本文介绍了SQL Server数据库上次更新日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何sql脚本来查明SQL服务器中的数据库上次更新时间?

Is there any sql script to find out when the database in SQL server is last updated?

我想知道对数据库的元数据所做的更改的最后更新日期时间,而不是表中的实际数据。
特别是当:

I want to know the last updated date time for the changes done on meta data of the database rather than actual data inside the table. Particularly when:


  • 从数据库创建/删除任何新表。

  • 在数据库中的表中添加/删除任何新列。

  • 在数据库中添加/更改任何新视图/存储过程/函数。

推荐答案

查看sys.objects应该足够了,尝试这个查询

Look in sys.objects should be enough, try this query

 select * from sys.objects
order by modify_date desc

这篇关于SQL Server数据库上次更新日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆