473,378 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Space Available Within A Filegroup

I am using SQL Server 2000. How can I tell how much free space is
available within a particular filegroup? What query can I run to get
this information?
Thanks,
Greg

Mar 4 '06 #1
1 2207
(Gr*************@gmail.com) writes:
I am using SQL Server 2000. How can I tell how much free space is
available within a particular filegroup? What query can I run to get
this information?


The used space in a file group in MB:

SELECT SUM(reserved)*8192/1000000 FROM sysindexes
WHERE indid IN (0, 1)
AND groupid = filegroup_id('YOURGROUP')

The total space available in a file group in MB:

SELECT SUM(size)*8192/1000000 FROM sysindexes
WHERE groupid = filegroup_id('YOURGROUP')

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: python newbie | last post by:
Is there anything that would get in the way of me being able to reference an object attribute, from within a list. I have: # one class here class BackupSet: fileGroupList = # ...
1
by: John Jayaseelan | last post by:
Hi, Received the following error during index creation of the tables. The data & log files are set to 'unrestricted growth' and enough space available on the disk. Any reasons? ___________...
4
by: el emperador | last post by:
I have a big table (heap)... well, not so big, I have a small server and I want to spread access to it across several new disks dedicated only to that table. I known its possible to do that...
1
by: John Dalberg | last post by:
I am getting a "Could not allocate space for object 'temp_trc' in database 'Test' because the 'PRIMARY' filegroup is full" The database test has unrestricted growth (All the defaults). It resides...
0
by: newbiegca_sqlsever2000 | last post by:
SQLServer 2000 Backup question. Let us say we have a database where data is stored in filegroup F1 and Filegroup F2 Backup of this is done on alternate days Day 1 - Full backup of file...
14
by: LineVoltageHalogen | last post by:
Greetings All, I was hoping that someone might be able to shed some light on this issue. I am trying to add a FileGroup/Datafile to an existing SQL database. The code below compile and it runs in...
5
by: Yasaswi Pulavarti | last post by:
does a command like, db2 drop table tabschema.tabname when run from the Aix prompt reclaim the disk space? Are there any other options? How can we make sure the disk space is reclaimed? Thanks,...
4
by: Dr Warehouse | last post by:
Hi, I am expanding our data warehouse solution with new filegroups on several subsystems. I want to know which idea is better! - create clustered indexes on tables to 'move' them to new...
0
by: Takpol | last post by:
Hello, I have several archived filegroups that have data in them partitioned based on the date. These filegroups have been removed from database after archival. For example two months ago....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.