-3

How can one check the SQL Server database and table size (in MB) using C#?

mitraark
  • 13
  • 1
  • 9
  • Duplicate of [Determine SQL Server Database Size](http://stackoverflow.com/questions/176379/determine-sql-server-database-size), [SQL Server 2008: How to query all databases sizes?](http://stackoverflow.com/questions/5945360/sql-server-2008-how-to-query-all-databases-sizes) and some others. Please use the search first. – CodeCaster May 29 '13 at 09:22

1 Answers1

0

Have you looked at the sp_spaceused stored procedure? Just execute it with DBName.Tablename.

Here is the MSDN Link

Vahid Farahmandian
  • 6,081
  • 7
  • 42
  • 62
Dhwani
  • 7,484
  • 17
  • 78
  • 139