Bookmark and Share

Wednesday, April 15, 2009

Database size via query

Here are some usefull Sql commands for space verification on a database:

-- DB space
exec sp_spaceused

--space for a table
exec sp_spaceused 'tablename'

-- databases list
exec sp_databases

-- SQL version
Select @@version

-- All sql server version infos
exec xp_msver