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.ndf
I 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_GroupHistory
Questions:
1)
How do I add tables to each .ndf file inside a group i.e. FG_GroupData
For 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 query
Thanks
You can only assign the tables to a filegroup not a specific file, this will all be managed by SQL Server.
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||You cannot control where a table is placed on file level only on filegroup level.
The only option you have (if it is really necessary to separate the two tables) is to create a third filegroup.
Files within a filegroup get proportionally filled so if you add 2 files to the filegroup the tables will be spread over these 2 files.
*EDIT*
Oops too slow for Jens :-)
WesleyB
Visit my SQL Server weblog @. http://dis4ea.blogspot.com
No comments:
Post a Comment