简体   繁体   English

如何找出SQL Server 2005中每个数据库的日志大小?

[英]how to find out log size of each of the database in sql server 2005?

Duplicate of: How to find out size of the individual databases in the sql server 2005? 重复项: 如何找出sql server 2005中各个数据库的大小?

how to find out log size of each of the database in sql server 2005? 如何找出SQL Server 2005中每个数据库的日志大小?

In SQL management studio , goto object explorer, right click database, goto "properties" , select "Files" . 在SQL Management Studio中,转到对象浏览器,右键单击数据库,转到“属性”,然后选择“文件”。 These you can see one "Initial size" column which will be the size of your DB. 这些您可以看到一个“初始大小”列,该列将是数据库的大小。 you will get both Data and Log file size over here. 您将在此处获得数据和日志文件的大小。

您可以使用以下SQL:

EXECUTE sp_msforeachdb 'SELECT *, GETDATE() FROM [?].sys.database_files'

try this 尝试这个

dbcc sqlperf(logspace)

Bye. 再见

如果您有权利...

SELECT SIZE/128.0, * FROM sys.master_files MF WHERE MF.type = 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server 2005 - 如何找出已还原的事务日志文件 - SQL Server 2005 - How to find out what transaction log files have been restored 如何编写 SQL 查询以找出在 Sql Server 2005 中哪些登录已被授予哪些权限? - How to write an SQL query to find out which logins have been granted which rights in Sql Server 2005? sql server 2005镜像数据库事务日志文件维护 - sql server 2005 mirrored database transaction log file maintenance 如何在SQL Server(2005)中查找WITH RECOMPILE元数据? - How to find WITH RECOMPILE metadata in SQL Server (2005)? 是否可以找出谁在 SQL Server 2005 中调用了存储过程 - Is it possible to find out who called a stored procedure in SQL Server 2005 如何查找SQL Server 2005中未执行或访问时间超过6个月的数据库视图 - How to Find the Database Views Which are not executed or Accessed for more than 6 Months in SQL Server 2005 如何在SQL Server 2005中还原SQL SERVER 2008数据库 - How to restore SQL SERVER 2008 database in SQL Server 2005 如何将SQL Server 2005表导出到SQL Server Compact数据库 - How to export SQL Server 2005 tables to SQL Server Compact database SQL 2005日志文件初始大小 - SQL 2005 Log File Initial Size 在SQL Server 2005中对数据库进行分区 - Partitioning of the database in SQL Server 2005
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM