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

Thursday, March 29, 2012

data files filling up algorithm

Hi,
I have an sql database which has 3 datafiles belonging to the same filegroup. Could anyone tell me in what fashion the datafiles will fillup.
RegardsEqually in proportion
"ramy" <anonymous@.discussions.microsoft.com> wrote in message
news:162788A4-56D3-4BD0-8B42-15C0C740C85D@.microsoft.com...
> Hi,
> I have an sql database which has 3 datafiles belonging to the same
filegroup. Could anyone tell me in what fashion the datafiles will fillup.
> Regards|||As Hassan suggest, the algorythm is called "proportional fill"... SQL tries
to keep EACH data file the same percentage full... So it will add new
records to the data files which are less full, and when they become equally
full, a round robin type approach will keep the data files equally (by
percentage) full.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"ramy" <anonymous@.discussions.microsoft.com> wrote in message
news:162788A4-56D3-4BD0-8B42-15C0C740C85D@.microsoft.com...
> Hi,
> I have an sql database which has 3 datafiles belonging to the same
filegroup. Could anyone tell me in what fashion the datafiles will fillup.
> Regards

Data Files and one FileGroup

Hi,
Is it OK if we have one FileGroup but 3 data files in different disk drives?
We have a database of size 150G, two data fils are in the same disk drive
and the third data file is in a different disk driver. All are in the same
filegroup.
Shouldn't we create another file group for the third data file?
Thanks,
RosieRosie,
You're probably fine. Multiple files in a filegroup is common. MS
recommends one file per physical processor to help parrallelism. One thing
to look out for is for best performance you want the files to file at the
same rate. Autogrow and adding additional files often leads to hot spots on
the IO subsystem.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
> Shouldn't we create another file group for the third data file?
> Thanks,
> Rosie
>
>|||inline
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
sunila> Yes. This will help you distribute the IO load across multiple
spindles.
> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
Sunila> I will be curious to know why created two files belonging to same
file group on the same disk?
> Shouldn't we create another file group for the third data file?
Sunila> SQL Server allows creating file group that contains files from one
or more physical disks.
> Thanks,
> Rosie
>
>|||> You're probably fine. Multiple files in a filegroup is common. MS recommends one file per
> physical processor to help parrallelism.
Interesting... Do you have a link to that statement? So far, the only thing I've seen is that you
might want to consider the number of physical disks. Somewhere between 1 file per disk to 1 file per
8 disks. MS haven't given out a firm recommendation as it is very hw dependent.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Danny" <someone@.nowhere.com> wrote in message news:CIPef.19373$%t4.15694@.trnddc07...
> Rosie,
> You're probably fine. Multiple files in a filegroup is common. MS recommends one file per
> physical processor to help parrallelism. One thing to look out for is for best performance you
> want the files to file at the same rate. Autogrow and adding additional files often leads to hot
> spots on the IO subsystem.
>
> "Rosie" <Rosie@.discussions.microsoft.com> wrote in message
> news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
>> Hi,
>> Is it OK if we have one FileGroup but 3 data files in different disk drives?
>> We have a database of size 150G, two data fils are in the same disk drive
>> and the third data file is in a different disk driver. All are in the same
>> filegroup.
>> Shouldn't we create another file group for the third data file?
>> Thanks,
>> Rosie
>>
>

Data Files and one FileGroup

Hi,
Is it OK if we have one FileGroup but 3 data files in different disk drives?
We have a database of size 150G, two data fils are in the same disk drive
and the third data file is in a different disk driver. All are in the same
filegroup.
Shouldn't we create another file group for the third data file?
Thanks,
Rosie
Rosie,
You're probably fine. Multiple files in a filegroup is common. MS
recommends one file per physical processor to help parrallelism. One thing
to look out for is for best performance you want the files to file at the
same rate. Autogrow and adding additional files often leads to hot spots on
the IO subsystem.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
> Shouldn't we create another file group for the third data file?
> Thanks,
> Rosie
>
>
|||inline
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
sunila> Yes. This will help you distribute the IO load across multiple
spindles.

> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
Sunila> I will be curious to know why created two files belonging to same
file group on the same disk?
> Shouldn't we create another file group for the third data file?
Sunila> SQL Server allows creating file group that contains files from one
or more physical disks.

> Thanks,
> Rosie
>
>
|||> You're probably fine. Multiple files in a filegroup is common. MS recommends one file per
> physical processor to help parrallelism.
Interesting... Do you have a link to that statement? So far, the only thing I've seen is that you
might want to consider the number of physical disks. Somewhere between 1 file per disk to 1 file per
8 disks. MS haven't given out a firm recommendation as it is very hw dependent.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Danny" <someone@.nowhere.com> wrote in message news:CIPef.19373$%t4.15694@.trnddc07...
> Rosie,
> You're probably fine. Multiple files in a filegroup is common. MS recommends one file per
> physical processor to help parrallelism. One thing to look out for is for best performance you
> want the files to file at the same rate. Autogrow and adding additional files often leads to hot
> spots on the IO subsystem.
>
> "Rosie" <Rosie@.discussions.microsoft.com> wrote in message
> news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
>

Data Files and one FileGroup

Hi,
Is it OK if we have one FileGroup but 3 data files in different disk drives?
We have a database of size 150G, two data fils are in the same disk drive
and the third data file is in a different disk driver. All are in the same
filegroup.
Shouldn't we create another file group for the third data file?
Thanks,
RosieRosie,
You're probably fine. Multiple files in a filegroup is common. MS
recommends one file per physical processor to help parrallelism. One thing
to look out for is for best performance you want the files to file at the
same rate. Autogrow and adding additional files often leads to hot spots on
the IO subsystem.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
> Shouldn't we create another file group for the third data file?
> Thanks,
> Rosie
>
>|||inline
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosie" <Rosie@.discussions.microsoft.com> wrote in message
news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
> Hi,
> Is it OK if we have one FileGroup but 3 data files in different disk
> drives?
sunila> Yes. This will help you distribute the IO load across multiple
spindles.

> We have a database of size 150G, two data fils are in the same disk drive
> and the third data file is in a different disk driver. All are in the same
> filegroup.
Sunila> I will be curious to know why created two files belonging to same
file group on the same disk?
> Shouldn't we create another file group for the third data file?
Sunila> SQL Server allows creating file group that contains files from one
or more physical disks.

> Thanks,
> Rosie
>
>|||> You're probably fine. Multiple files in a filegroup is common. MS recommends one file pe
r
> physical processor to help parrallelism.
Interesting... Do you have a link to that statement? So far, the only thing
I've seen is that you
might want to consider the number of physical disks. Somewhere between 1 fil
e per disk to 1 file per
8 disks. MS haven't given out a firm recommendation as it is very hw depende
nt.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Danny" <someone@.nowhere.com> wrote in message news:CIPef.19373$%t4.15694@.trnddc07...seagreen">
> Rosie,
> You're probably fine. Multiple files in a filegroup is common. MS recomm
ends one file per
> physical processor to help parrallelism. One thing to look out for is for
best performance you
> want the files to file at the same rate. Autogrow and adding additional f
iles often leads to hot
> spots on the IO subsystem.
>
> "Rosie" <Rosie@.discussions.microsoft.com> wrote in message
> news:D194C8A5-5B94-4CBA-A994-4E78EA69E6B9@.microsoft.com...
>

Tuesday, March 27, 2012

Data File and Filegroup in DB Properties

Hi All,
Is it possible to change db file to single file from multiple files?
Thanks any help
MelihMelih wrote:
> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih
Look up DBCC SHRINKFILE, particularly the EMPTYFILE clause.|||Melih,
Sure, you can remove a file from a filegroup when it is empty, using "alter
database". To empty the file use "DBCC SHRINKFILE(file_name | fiel_id,
EMPTYFILE)", it move the data to others files in the filegroup and mark it so
no more data is added to it.
Example:
use northwind
go
alter database northwind
add file (name=northwind_2,filename='c:\temp\northwind_data_2.ndf',size=512KB)
go
-- not needed in this case because it is empty
dbcc shrinkfile(northwind_2, EMPTYFILE)
go
alter database northwind
remove file northwind_2
go
AMB
"Melih" wrote:
> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih

Data File and Filegroup in DB Properties

Melih wrote:
> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih
Look up DBCC SHRINKFILE, particularly the EMPTYFILE clause.Melih,
Sure, you can remove a file from a filegroup when it is empty, using "alter
database". To empty the file use "DBCC SHRINKFILE(file_name | fiel_id,
EMPTYFILE)", it move the data to others files in the filegroup and mark it s
o
no more data is added to it.
Example:
use northwind
go
alter database northwind
add file (name=northwind_2,filename='c:\temp\nort
hwind_data_2.ndf',size=512K
B)
go
-- not needed in this case because it is empty
dbcc shrinkfile(northwind_2, EMPTYFILE)
go
alter database northwind
remove file northwind_2
go
AMB
"Melih" wrote:

> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih|||Hi All,
Is it possible to change db file to single file from multiple files?
Thanks any help
Melih|||Melih wrote:
> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih
Look up DBCC SHRINKFILE, particularly the EMPTYFILE clause.|||Melih,
Sure, you can remove a file from a filegroup when it is empty, using "alter
database". To empty the file use "DBCC SHRINKFILE(file_name | fiel_id,
EMPTYFILE)", it move the data to others files in the filegroup and mark it s
o
no more data is added to it.
Example:
use northwind
go
alter database northwind
add file (name=northwind_2,filename='c:\temp\nort
hwind_data_2.ndf',size=512K
B)
go
-- not needed in this case because it is empty
dbcc shrinkfile(northwind_2, EMPTYFILE)
go
alter database northwind
remove file northwind_2
go
AMB
"Melih" wrote:

> Hi All,
> Is it possible to change db file to single file from multiple files?
> Thanks any help
> Melih