Readme_PartitioningScript


[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
This sample works only with SQL Server 2005 and SQL Server "Katmai". It will not work with any version of SQL Server earlier than SQL Server 2005.
The purpose of the PartitioningScript sample is to demonstrate the table and index partitioning capabilities of SQL Server. For information about this 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 and make sure you include the following components:
*

SQL Server Management Studio

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\100\Samples\Engine\ Administration\Partitioning\Scripts, and then click Execute. © 2007 Microsoft Corporation. All rights reserved.