Query to find SQLServer Database File Growth Details


select

DB_Name(database_id) as DB,

file_id asFileID_ONServer,physical_name,

type_desc,

case

when is_percent_growth = '1'

then 0

else 

convert(decimal(12,1),((growth*8)/1024.00))

end as growth_in_MB,

case

when max_size = '-1'

then max_size

else convert(decimal(38,2),((max_size/1024.00)*8))

end as maxsize_in_mb,

case

when is_percent_growth = '1'

then growth

else  0

end as growth_in_Percent,

is_percent_growth from sys.master_files;

Comments

  1. I sincerely appreciate you taking the time to share these information

    ReplyDelete

Post a Comment

Popular posts from this blog

Announcing backup and restore improvements for large datasets near the size limit

Enhanced refresh with the Power BI REST API is now generally available

What’s New in SQL Server 2014 since SQL Server 2008 R2