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.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-08-06 : 05:06:40
|
Hi,I have created a database with two filegroups called FG_GroupData, FG_GroupHistory.FG_GroupData is set as default.FG_GroupData contains two secondary data files i.e. GroupData1.ndf and GroupData2.ndfI can create a table so that it is stored in FG_GroupHistory. i.e.CREATE TABLE dbo.OrdersHistory(OrderID int NOT NULL,ProductID int NOT NULL,CustomerID int NOT NULL, UnitPrice money NOT NULL,OrderQty smallint NOT NULL)ON FG_GroupHistoryQuestions:1)How do I add tables to each .ndf file inside a group i.e. FG_GroupDataFor example, how do I add a table to GroupData1.ndf and one to GroupData2.ndf ?2)I guess there is no need to place the file name i.e. .ndf inside the select queryThanks |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-06 : 12:38:54
|
1. you can't specify which file to use in filegroup.2. you select rows from table not from data file. |
 |
|
marbos
Starting Member
7 Posts |
Posted - 2007-08-16 : 16:32:56
|
When you use placement options on Filegroups, then when data is written to a table residing on said Filegroup, it is distributed automatically across all files residing in the group.Also, the previous comment is also correct in that you cannot specify the file in the filegroup that gets used. Just consider Filegroups to be logical containers that their files reside physically on disk where you want them. The best reason for using Filegroups in my opinion is for performance gains. |
 |
|
|
|
|