Monday, September 9, 2024

How can I check the size of a specific database in SQL Server?

 You can check the size of a database using the following query:

EXEC sp_spaceused;

Or, for a specific database:

USE YourDatabaseName;

EXEC sp_spaceused;

This command returns the database size, reserved space, unallocated space, and more.