This project is read-only.

Readme_FileGroups Sample

11/05/2008 21:36:06

This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
The purpose of this sample is to demonstrate filegroup and file capabilities in SQL Server. For more information, see "Designing Files and Filegroups" in SQL Server Books Online.


Filegroups allow files to be grouped together for administrative and data allocation/placement purposes. For example, filegroups allow placement of objects on specific physical disks, which can improve performance due to parallel disk I/O searching. Also, files and filegroups can be backed up and restored individually, which can increase the speed of recovery by allowing you to restore only damaged files without restoring the rest of the database.
This sample creates:
  • The WorkOrderGroup filegroup and the data file WorkOrders and then moves the Production.WorkOrder and Production.WorkOrderRouting tables to that filegroup in the AdventureWorks sample database.
  • The TransactionHistoryGroup filegroup and data file TransactionHistory and then moves the TransactionHistory and TransactionHistoryArchive tables to that filegroup in the AdventureWorks sample database.




Before you run this sample, perform the following tasks:

Running the Sample

The following procedure shows how to run the CreateFileGroups.sql Transact-SQL script that creates files and filegroups in the AdventureWorks sample database.
Running the CreateFilegroups Sample
  1. From SQL Server Management Studio, open the file CreateFileGroups.sql, located in the C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Administration\FileGroups folder, and click Execute. © 2008 Microsoft Corporation. All rights reserved.

Last edited Nov 6, 2008 at 11:48 PM by bonniefe, version 9


No comments yet.