Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Physical size of MS SQL Table

How to find what the physical size of table in MS Sql 2005? Is it possible using sql query or not? Thanks.

like image 566
jitm Avatar asked May 12 '10 08:05

jitm


People also ask

How big is a SQL table?

The number of tables in a database is limited only by the number of objects allowed in a database (2,147,483,647). A standard user-defined table can have up to 1,024 columns. The number of rows in the table is limited only by the storage capacity of the server.

What is physical table in SQL Server?

A physical table is an object in the Physical layer of the Administration Tool that corresponds to a table in a physical database. Physical tables are usually imported from a database or another data source, and they provide the metadata necessary for the Analytics Server to access the tables with SQL requests.

Is there a limit on SQL table size?

You are using a MyISAM table and the space required for the table exceeds what is permitted by the internal pointer size. MyISAM permits data and index files to grow up to 256TB by default, but this limit can be changed up to the maximum permissible size of 65,536TB (2567 − 1 bytes).


1 Answers

Try the stored procedure:

exec sp_spaceused TableName

For all tables you could use:

exec sp_Msforeachtable 'exec sp_spaceused ''?'''
like image 70
Matt Avatar answered Oct 22 '22 13:10

Matt