Query to find SQLServer Database File Growth Details


select

DB_Name(database_id) as DB,

file_id as FileID_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

Hi User,
Thanks for visiting My Blog and please provide your valuable feedback and subscribe for more updates. Please don't post any spam content or comments.
Thank You

Popular Posts

Failed to execute the package or element. Build errors were encountered

Restore of database 'DataBase_Name' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

Cannot convert "Column" between a unicode and a non-unicode string data types in SSIS