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 2005 Forums
 SQL Server Administration (2005)
 How do i tell my db size using TSQL ?

Author  Topic 

missMac
Posting Yak Master

124 Posts

Posted - 2009-06-01 : 17:27:38
How do i tell my db size using TSQL ?

THANKS

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-06-01 : 17:28:08
You can use sp_spaceused, but I prefer to use sp_databases.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2009-06-01 : 17:40:08
EXEC sp_spaceused
SELECT fileid, name, filename, size, growth, status, maxsize
FROM dbo.sysfiles WHERE (status & 0x40) <>0
DBCC sqlperf(logspace)
DBCC showfilestats

http://www.sqlmag.com/Article/ArticleID/48339/sql_server_48339.html

Go to Top of Page
   

- Advertisement -