Showing posts with label filegroup. Show all posts
Showing posts with label filegroup. Show all posts

Sunday, February 26, 2012

Free space of my filegroup

Hi:
How can i get the Total and Free space of my filegroups, do you have some script for that?
Thnaks :eek:What DBMS are you talking about?|||Hi:

SQL Server 2000, thank's for your answer.|||You posted in wrong forum then. I will move you...|||Thank you :o

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contain
s
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:

> Hi everyone,
> I need to write a SP to check the available free space in a certain databa
se
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('file
name
',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...[vbcol=seagreen]
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote:
>

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contains
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:
> Hi everyone,
> I need to write a SP to check the available free space in a certain database
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('filename',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote:
>> Hi everyone,
>> I need to write a SP to check the available free space in a certain
>> database
>> filegroup(SQL Server 2000 database).
>> Any help will be appreciated.
>>
>> Best Regards,
>>
>>

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,
Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contains
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:

> Hi everyone,
> I need to write a SP to check the available free space in a certain database
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>
|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('filename',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...[vbcol=seagreen]
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote: