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)
 list free space in a folder

Author  Topic 

Blin
Starting Member

36 Posts

Posted - 2005-10-24 : 15:27:11
I know master.dbo.xp_fixeddrives lists all free spaces in the drives of a server. But, I would like to know if anyone know how to list free space in a folder of a drive for monitoring purpose?

Thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-10-24 : 15:34:21
There is no concept of free space in a folder. You can monitor how big the folder is though but not how much free space it has as there isn't a limit on the folder.

So could you explain what you mean?

Tara
Go to Top of Page

gkrishn
Starting Member

16 Posts

Posted - 2005-10-25 : 12:10:22
free space in a folder would be same as what you get through
master.dbo.xp_fixeddrives in that particular drive .

But in unix its somthing diff: there can be multiple devices mounted under a particular folder/dir

Rajiv
SQL/ORACLE DBA
INDIA
Go to Top of Page

Blin
Starting Member

36 Posts

Posted - 2005-10-25 : 14:08:21
Our Sys Admin created the following volumes/partitions:

G:\ as a mount point - 1 GB
G:\DATA01 - 15 GB
G:\LOG01 - 3 GB

I could see used and free spaces when I looked in the properties of G:\DATA01 and G:\LOG01. But it only returned free size (1,005,906,844) in the G:\ drive when I ran xp_fixeddrives. It seems that only G:\ is recognized but not the other two volumes even if I specified G:\DATA01 or G:\LOG01.

Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-10-25 : 14:14:10
DATA01 and LOG01 are just folders from Windows' perspective, right? You can only view free space on G as there is no concept of free space in a folder in a Windows environment.

Tara
Go to Top of Page

Blin
Starting Member

36 Posts

Posted - 2005-10-25 : 14:38:35
DATA01 and LOG01 look like folders but they are volumes. G:\ is a mount point. A mount point is a directory on a volume that an application can use to "mount" (set up for use) a different volume. Mount points overcome the limitation on drive letters and allow more logical organization of files and folders. You are right about no free space in a folder since folders reside on a volume. If G:\DATA01 named like H:, xp_fixeddrives would list the free space on it.

Thanks.
Go to Top of Page

gkrishn
Starting Member

16 Posts

Posted - 2005-10-25 : 14:43:29
Unlike we think, mount and moutpoint are also available in Windows also -- http://www.windowsitpro.com/Windows/Article/ArticleID/41974/41974.html

In your case, DATA01 and LOG01 could be two drives mapped(mounted) under drive G:\ .Could you please confirm this ?
-Rajiv
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-10-25 : 14:45:21
I understand that. The problem is that you are viewing it from Windows' perspective which can only see free space on a drive.

Tara
Go to Top of Page
   

- Advertisement -