Size of the individual tables | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Size of the individual tables

Can we get the size of all the individual tables in a database??
sp_MSForEachtable ‘sp_spaceused ”?”’ Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
But Luis this didn’t work….I didn’t get any result set except a message ‘Commands completed successfully’..
Did you use Query Analyzer and run with your database?.
Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
yes Luis……
I can’t understand why. It works fine for me.
Search what I wrote in all our forum and you will find all about it.
Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
Could you please paste the result set which you are getting..
A few rows: name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SUCURSALESCAJAS 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
BRNECABAS 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SICOREPROVINCIASC 25 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
OBSERVACIONES 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SUCURSALESSIN 2 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MEDIOSPAGORANGOS 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ALERTASCUENTAS 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PV_TARJETASCONEXIONES 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
saldoproveedor280204 6 72 KB 8 KB 8 KB 56 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SUCURSALESTALON 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
NEGOCIOSATRIB 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PALABRASOBS 25 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MEDIOSPAGOSCANNER 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
CURVASTALLES 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PARAM1361 1 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
comicob20040813 5541 2064 KB 2040 KB 8 KB 16 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
vencimven 5630 2128 KB 2080 KB 8 KB 40 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PV_TERMINALPOSNETCONEXION 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
CTACTESPORIB 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SUCURSALESHORAS 0 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
TMP_AntSallv 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
BRTABLASCOLSCASE 257 40 KB 32 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
CURVASTALLESDET 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
TABLASSIN1547 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ALERTASTALON 2 16 KB 8 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
TABLASCOD1547 61 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MVSMESASALDOS 0 32 KB 24 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
TAREASINSUMOSDISTRIB 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
SALDOS280203 1088 200 KB 144 KB 8 KB 48 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
EXIELECTRO290204 38512 18192 KB 18136 KB 8 KB 48 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MESASALDOS 0 32 KB 24 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
OLAP_CONTABLE_VIS 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MVSCONTROL 0 32 KB 24 KB 8 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ARMADO 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PV_CAJATERMINALPOSNET 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MVSTAREASINSUMOSDISTRIB 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
VENCIM 5360 2008 KB 1968 KB 16 KB 24 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ACUMULADORES 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
PARAMU 1 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ACUMULADORESDETALLE 0 0 KB 0 KB 0 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
APLICACIONES 783888 484152 KB 91936 KB 391640 KB 576 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
ATRIBUTOS 56 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
TIPODOCCU 4 24 KB 8 KB 16 KB 0 KB name rows reserved data index_size unused
——————————————————————————————————————————– ———– —————— —————— —————— ——————
MVSTAREASPEDIDOS 0 0 KB 0 KB 0 KB 0 KB Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
Are you trying to parse the query or execute, this should produce the result set. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
Run Luis’s suggestion on your actual database If you run it on master or model it will return nothing (maybe the same is true for all system databases, Im not sure)
or try this http://sqlteam.com/forums/topic.asp?TOPIC_ID=61762
Madhivanan Failing to plan is Planning to fail

I tried that which Luis have given in SQL 2000 and it worked, seems that it doesn’t work in SQL 2005.
Post your 2005 related questions at relevent forum Madhivanan Failing to plan is Planning to fail
]]>