Check Data Usage on MSSQL2005

Here's SQL Command for checking available space on SQL 2005

select DB_NAME() as dbname,name as filename,size/128.0 as currentsizeMB,
size/128.0 - CAST(FILEPROPERTY(name,'SpaceUsed') as INT)/128.0 as FreeSpaceMB
From sys.database_files


Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.