Technical Article

Growth remaining for SQL Server 2005 databases

,

Just open up SQL Server Management Studio and run the above script.

--growth remaining in SQL Server 2005 databases--
SELECT 
    name AS FileName, 
    (size*1.0/128) AS FileSizeinMB,
    (CASE max_size 
        WHEN 0 THEN 'Autogrowth is off.'
        WHEN -1 THEN 'Autogrowth is on.'
        ELSE 'Log file will grow to a maximum size of 2 TB.'
    END) Autogrowth,
    growth AS 'GrowthValue',
    'GrowthIncrement' = 
        CASE
            WHEN growth = 0 THEN 'Size is fixed and will not grow.'
            WHEN growth > 0 AND is_percent_growth = 0 
                THEN 'Growth value is in 8-KB pages.'
            ELSE 'Growth value is a percentage.'
        END
FROM sys.database_files;
GO

Rate

1 (3)

You rated this post out of 5. Change rating

Share

Share

Rate

1 (3)

You rated this post out of 5. Change rating