Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Table size

Author  Topic 

mk_garg20
Constraint Violating Yak Guru

343 Posts

Posted - 2004-09-01 : 21:56:47
How i can check size of a table in the database.
Thanks


mk_garg

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-09-02 : 01:31:05
Look up "Estimating the Size of a Table." in BOL

Go to Top of Page

mk_garg20
Constraint Violating Yak Guru

343 Posts

Posted - 2004-09-02 : 01:48:17
Just had a look.
Not very straight forward.
Thanks



mk_garg
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2004-09-02 : 07:27:06
sp_spaceused maybe?!?
Go to Top of Page

gonk
Starting Member

8 Posts

Posted - 2004-09-02 : 07:41:14
in asp

<%
on error resume next
Response.Buffer=false

Set adoGefahr40 = CreateObject("ADODB.Connection")
adoGefahr40.Open "..."


SQL="SELECT distinct * FROM sysobjects where Xtype='U' ORDER BY name"
set rs=adoGefahr40.Execute(SQL)
SQL="sp_spaceused '" & RS("name") & "'"
set rs2=adoGefahr40.Execute(SQL)
%>
<table border=1 cellspacing=0>
<tr>
<%for each element in rs2.Fields%>
<td><%=element.name%></td>
<%next%>
</tr>
<%do while not RS.EoF
SQL="sp_spaceused '" & RS("name") & "'"
set rs2=adoGefahr40.Execute(SQL)%>
<tr>
<%for each element in rs2.Fields%>
<td><%=element.value%></td>
<%next%>
</tr>
<%RS.MoveNext
loop
%>
</table>
Go to Top of Page

mk_garg20
Constraint Violating Yak Guru

343 Posts

Posted - 2004-09-02 : 18:29:04
sp_spaceused gives me table size.

How to determine Database size?

mk_garg
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-02 : 18:35:46
If you run sp_spaceused without any parameters, it returns the database size in the first result set. You can also use sp_databases.

Tara
Go to Top of Page

mk_garg20
Constraint Violating Yak Guru

343 Posts

Posted - 2004-09-02 : 18:59:43
Thanks Tara.

mk_garg
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2004-09-06 : 12:05:58
From EM..
Select the DB in EM->right click->view->task pad.
From the right pane select TABLE INFO


------------------------
I think, therefore I am
Go to Top of Page
   

- Advertisement -