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

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

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

On-premises data gateway December release