Feeds:
Posts
Comments

Posts Tagged ‘sql server size’

For one table

sp_spaceused ‘TABLE_NAME’

 

For all tables

EXEC
sp_msForEachTable ‘EXEC
sp_spaceused ”?”’

 

–OR

 

CREATE
TABLE #TableSize

(

   
SEQ INT IDENTITY(1,1) ,

   
name NVARCHAR(200),

   
rows BIGINT,

   
reserved VARCHAR(100),

   
data VARCHAR(100),

   
index_size VARCHAR(100),

   
unused VARCHAR(100)

)

 

INSERT
#TableSize

EXEC
sp_msForEachTable ‘EXEC
sp_spaceused ”?”’

 

SELECT * FROM
#TableSize

Read Full Post »

%d bloggers like this: