Readme_PartitioningScript



The purpose of the PartitioningScript sample is to demonstrate the table and index partitioning capabilities of SQL Server 2005. For information about this new feature, see "Partitioned Tables and Indexes" in SQL Server Books Online.

Important:
Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications should not be connected to or used with your production SQL Server database without the permission of the system administrator.



Scenario

In the AdventureWorks sample database, the TransactionHistory table is used to record each sales order, purchase order, and work order transaction. Therefore, this table is one of the largest and most heavily accessed tables in the database. The TransactionHistoryArchive table was created to store older transactions from the TransactionHistory table. Data is transferred to TransactionHistoryArchive on a monthly basis for additional analysis enabling TransactionHistory to stay reasonably small and maintain current data only.
To create the partitions for these tables, the sample performs these operations:

Languages

Transact-SQL

Prerequisites

Before you run this sample, install SQL Server 2005 and make sure you include the following components:

Running the Sample

The following procedure shows how to run the PartitioningScript sample.
To run the PartitioningScript sample
  1. In SQL Server Management Studio, open the file PartitionAW.sql. The default installation directory is C:\Program Files\Microsoft SQL Server\90\Samples\Engine\Administration\Partitioning\Scripts, and then click Execute. © 2007 Microsoft Corporation. All rights reserved.