Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to calculate tempdb space

451 views
Skip to first unread message

Andy S

unread,
Jan 22, 2003, 9:15:09 AM1/22/03
to
Does anyone have a calculation to return the % used of tempdb where tempdb
is made up of combined data & log

Thanks
Andy


KR

unread,
Jan 22, 2003, 12:25:08 PM1/22/03
to
select 'DB Size in KB'=sum(size) * (@@pagesize/1024),
'Free Space in KB' = sum( curunreservedpgs( db_id('tempdb'), lstart,
unreservedpgs ) ) * (@@pagesize/1024)
from master..sysusages
where dbid=db_id('tempdb')


"Andy S" <po...@forum.please> wrote in message
news:g9k3#IiwCH...@forums.sybase.com...

Andy S

unread,
Jan 23, 2003, 7:02:37 AM1/23/03
to
Excellent. Thanks KR

"KR" <zz...@mail.com.NOJUNK> wrote in message
news:zUADe3j...@forums.sybase.com...

kathir...@gmail.com

unread,
Jan 11, 2014, 3:14:44 PM1/11/14
to
Excellent Query.. thank you.
Message has been deleted

pankajkp...@gmail.com

unread,
Sep 17, 2016, 8:23:29 AM9/17/16
to
Hi KR,

Thanks for the post.

Sorry, but it shows me wrong output.

Like my tempdb is of 112MB while your query shows tempdb size 28672Kb (does I'm seeing this wrong.... I may be incorrect)

Thanks
Pankaj
0 new messages