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 – Embed your Power BI organizational apps in Microsoft Teams Channels and Meetings

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

Add the Power BI app to Microsoft Teams