EXEC sp_databases;
SELECT
    d.name AS 'Database',
    m.name AS 'File',
    m.size,
    m.size * 8/1024 'Size (MB)',
    SUM(m.size * 8/1024) OVER (PARTITION BY d.name) AS 'Database Total',
    m.max_size
FROM sys.master_files m
INNER JOIN sys.databases d ON
d.database_id = m.database_id;

Fix:

  • Shrink database file to recover unused space.
  • Add more disk space.
  • Purge data from database.
  • Move data to another database or data warehouse.

Sources:

Last modified: January 16, 2020

Author

Comments

Write a Reply or Comment