sql check size of database code example Example 1: sql database size EXEC sp_databases; Example 2: sql database size USE <database_name>; EXEC sp_spaceused;