PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > files in a filegroup: space used and data distribution
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
files in a filegroup: space used and data distribution

Réponse
 
LinkBack Outils de la discussion
Vieux 13/09/2008, 05h30   #1
Gene.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut files in a filegroup: space used and data distribution

Hi folks
I have 2 questions regarding multiple files in the same filgroup:
1. How to check actual space usage in a file, not to confuse with space in a
database.
2. Does sql distributes data to multiple files in a filegroup proportionaly
to it's size? I remember in BOL for 2k server there is some mentioning about
it. 2005 BOL does not mention that situation.

I like to think that sql will distribute data evenly between files in a file
group but still like to see proof of it.
  Réponse avec citation
Vieux 13/09/2008, 08h04   #2
John Bell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: files in a filegroup: space used and data distribution


"Gene." <Gene@discussions.microsoft.com> wrote in message
news:49BF6337-6C04-4AA1-BAFB-50F75804A5E3@microsoft.com...
> Hi folks
> I have 2 questions regarding multiple files in the same filgroup:
> 1. How to check actual space usage in a file, not to confuse with space in
> a
> database.


sp_file returns a usage value!

> 2. Does sql distributes data to multiple files in a filegroup
> proportionaly
> to it's size? I remember in BOL for 2k server there is some mentioning
> about
> it. 2005 BOL does not mention that situation.
>

How about under "Using Files and Filegroups"

"Filegroups use a proportional fill strategy across all the files within
each filegroup. As data is written to the filegroup, the SQL Server Database
Engine writes an amount proportional to the free space in the file to each
file within the filegroup, instead of writing all the data to the first file
until full. It then writes to the next file. For example, if file f1 has 100
MB free and file f2 has 200 MB free, one extent is allocated from file f1,
two extents from file f2, and so on. In this way, both files become full at
about the same time, and simple striping is achieved"


> I like to think that sql will distribute data evenly between files in a
> file
> group but still like to see proof of it.


See above

John

  Réponse avec citation
Vieux 13/09/2008, 13h51   #3
Gene.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: files in a filegroup: space used and data distribution

Thank you John, all answered.

"John Bell" wrote:

>
> "Gene." <Gene@discussions.microsoft.com> wrote in message
> news:49BF6337-6C04-4AA1-BAFB-50F75804A5E3@microsoft.com...
> > Hi folks
> > I have 2 questions regarding multiple files in the same filgroup:
> > 1. How to check actual space usage in a file, not to confuse with space in
> > a
> > database.

>
> sp_file returns a usage value!
>
> > 2. Does sql distributes data to multiple files in a filegroup
> > proportionaly
> > to it's size? I remember in BOL for 2k server there is some mentioning
> > about
> > it. 2005 BOL does not mention that situation.
> >

> How about under "Using Files and Filegroups"
>
> "Filegroups use a proportional fill strategy across all the files within
> each filegroup. As data is written to the filegroup, the SQL Server Database
> Engine writes an amount proportional to the free space in the file to each
> file within the filegroup, instead of writing all the data to the first file
> until full. It then writes to the next file. For example, if file f1 has 100
> MB free and file f2 has 200 MB free, one extent is allocated from file f1,
> two extents from file f2, and so on. In this way, both files become full at
> about the same time, and simple striping is achieved"
>
>
> > I like to think that sql will distribute data evenly between files in a
> > file
> > group but still like to see proof of it.

>
> See above
>
> John
>

  Réponse avec citation
Vieux 13/09/2008, 14h18   #4
Gene.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: files in a filegroup: space used and data distribution

John, where does sp_file shows actual usage? I only saw size.

"John Bell" wrote:

>
> "Gene." <Gene@discussions.microsoft.com> wrote in message
> news:49BF6337-6C04-4AA1-BAFB-50F75804A5E3@microsoft.com...
> > Hi folks
> > I have 2 questions regarding multiple files in the same filgroup:
> > 1. How to check actual space usage in a file, not to confuse with space in
> > a
> > database.

>
> sp_file returns a usage value!
>
> > 2. Does sql distributes data to multiple files in a filegroup
> > proportionaly
> > to it's size? I remember in BOL for 2k server there is some mentioning
> > about
> > it. 2005 BOL does not mention that situation.
> >

> How about under "Using Files and Filegroups"
>
> "Filegroups use a proportional fill strategy across all the files within
> each filegroup. As data is written to the filegroup, the SQL Server Database
> Engine writes an amount proportional to the free space in the file to each
> file within the filegroup, instead of writing all the data to the first file
> until full. It then writes to the next file. For example, if file f1 has 100
> MB free and file f2 has 200 MB free, one extent is allocated from file f1,
> two extents from file f2, and so on. In this way, both files become full at
> about the same time, and simple striping is achieved"
>
>
> > I like to think that sql will distribute data evenly between files in a
> > file
> > group but still like to see proof of it.

>
> See above
>
> John
>

  Réponse avec citation
Vieux 13/09/2008, 18h31   #5
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: files in a filegroup: space used and data distribution

Did you see my earlier reply to your other post? DBCC SHOWFILESTATS give you space utilization per
data file.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Gene." <Gene@discussions.microsoft.com> wrote in message
news:50CA909C-1669-4203-B959-08950D96A8AD@microsoft.com...
> John, where does sp_file shows actual usage? I only saw size.
>
> "John Bell" wrote:
>
>>
>> "Gene." <Gene@discussions.microsoft.com> wrote in message
>> news:49BF6337-6C04-4AA1-BAFB-50F75804A5E3@microsoft.com...
>> > Hi folks
>> > I have 2 questions regarding multiple files in the same filgroup:
>> > 1. How to check actual space usage in a file, not to confuse with space in
>> > a
>> > database.

>>
>> sp_file returns a usage value!
>>
>> > 2. Does sql distributes data to multiple files in a filegroup
>> > proportionaly
>> > to it's size? I remember in BOL for 2k server there is some mentioning
>> > about
>> > it. 2005 BOL does not mention that situation.
>> >

>> How about under "Using Files and Filegroups"
>>
>> "Filegroups use a proportional fill strategy across all the files within
>> each filegroup. As data is written to the filegroup, the SQL Server Database
>> Engine writes an amount proportional to the free space in the file to each
>> file within the filegroup, instead of writing all the data to the first file
>> until full. It then writes to the next file. For example, if file f1 has 100
>> MB free and file f2 has 200 MB free, one extent is allocated from file f1,
>> two extents from file f2, and so on. In this way, both files become full at
>> about the same time, and simple striping is achieved"
>>
>>
>> > I like to think that sql will distribute data evenly between files in a
>> > file
>> > group but still like to see proof of it.

>>
>> See above
>>
>> John
>>


  Réponse avec citation
Vieux 14/09/2008, 03h02   #6
Linchi Shea
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: files in a filegroup: space used and data distribution

If you want a documented way to find the file space usage, you can use the
FILEPROPERTY() function:

select *, fileproperty(name, 'SpaceUsed')*8 as 'SpaceUsed (KB)' from sysfiles

Linchi

"Gene." wrote:

> Hi folks
> I have 2 questions regarding multiple files in the same filgroup:
> 1. How to check actual space usage in a file, not to confuse with space in a
> database.
> 2. Does sql distributes data to multiple files in a filegroup proportionaly
> to it's size? I remember in BOL for 2k server there is some mentioning about
> it. 2005 BOL does not mention that situation.
>
> I like to think that sql will distribute data evenly between files in a file
> group but still like to see proof of it.

  Réponse avec citation
Vieux 15/09/2008, 00h30   #7
John Bell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: files in a filegroup: space used and data distribution


"Gene." <Gene@discussions.microsoft.com> wrote in message
news:50CA909C-1669-4203-B959-08950D96A8AD@microsoft.com...
> John, where does sp_file shows actual usage? I only saw size.
>
> "John Bell" wrote:
>


My bad that is that is whether it is data or not! See Tibor's and Linchi's
replies.

John

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13044 seconds with 15 queries