Balajiprasad's useful codes
Important codings & concepts in web & window applications using microsoft technologies.
Thursday, March 8, 2012
SQL Query to get Database Size & Individual table size
--total database size
sp_spaceused
--individual table size
select
object_name
(
id
)
[Table Name]
,
[Table Size]
=
convert
(
varchar
,
dpages
*
8
/
1024
)
+
'MB'
from
sysindexes
where
indid
in
(
0
,
1
)
order
by
dpages
desc
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)