Here’s a quick little statement you can use to verify the size and growth settings for a SQL Server database. It doesn’t spell everything out for you, but if you’re aware of some common conventions (-1 = unlimited, 0 = no growth), it’s a fast and easy way to verify settings before issuing your ALTER DATABASE command. The filename is commented out by default, but provided just-in-case.
select db_name() [Database] , name [Logical Name] , ceiling(size/128.0) [Size (MB)] , case maxsize when -1 then maxsize else ceiling(maxsize/128.0) end [MaxSize (MB)] , case when (status & 0x100000) = 0 then ceiling(growth/128.0) else growth end [Growth] , case when (status & 0x100000) = 0 then 'MB' else '%' end [% or MB] --, filename from sysfiles
Some example output:
Database Logical Name Size (MB) MaxSize (MB) Growth % or MB ReportServer ReportServer 18 -1 1 MB ReportServer ReportServer_log 177 2097152 10 %
And an image from SSMS to verify:


Comment Form