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)
 How much space is available in log/data file?

Author  Topic 

oitsubob
Yak Posting Veteran

70 Posts

Posted - 2004-07-16 : 17:59:29
We host a few dozen databases for clients in our organization. We've pretty much restricted them to 100MB database and 100MB of log space.

When you view the properties for the database, it treats the total size as 200MB and the space available is also combined value for the data and log file.

How can I find out how much space is available in each of the log and data files individually?

Thanks,

Bob

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-07-16 : 18:47:57
sp_spaceused

Tara
Go to Top of Page

oitsubob
Yak Posting Veteran

70 Posts

Posted - 2004-07-19 : 11:23:17
Thanks Tara. I had in fact tried that, but it didn't show me what I expected to see. I'll have to look at the results a little closer this time.

Bob
Go to Top of Page

rlahoty
Starting Member

11 Posts

Posted - 2004-07-19 : 13:20:21
You can use DBCC SQLPERF('LOGSPACE') to find out how much log space is allocated and how much of it is used.

For data files, you can also use DBCC SHOWFILESTATS. This command is not documented but does a nice job of letting you know how many extents have been allocated to the database and how many of them have been used. This command will return you information only about the current database though.

HTH
-Rajeev Lahoty
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2004-07-20 : 05:33:26
for pictoraial view
EM->select DB->right click->view->task pad

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

- Advertisement -