2012-03-14 8 views
1

私のチームは、パーティションを作成するには、ソース管理にあるスクリプトを実行しようとしていると私たちは次のようなエラーに実行している:スクリプトのCREATE/ALTER partition function failed as only a maximum of 1000 partitions can be created.SQL Serverのパーティションを最大限に活用する方法は?

パート:私たちの現在の設定にselect * from sys.partition_range_valuesを実行

CREATE PARTITION FUNCTION [PFDailyPartition](DATETIME) 
    AS RANGE RIGHT FOR VALUES ('01/01/2005 00:00:00' 
'01/02/2005 00:00:00' 
'01/03/2005 00:00:00' 
'01/04/2005 00:00:00' 
'01/05/2005 00:00:00' 
'01/06/2005 00:00:00' 
'01/07/2005 00:00:00' 
'01/08/2005 00:00:00' 
'01/09/2005 00:00:00' 
'01/10/2005 00:00:00' 
'01/11/2005 00:00:00' 
'01/12/2005 00:00:00' 
'01/13/2005 00:00:00' 
'01/14/2005 00:00:00' 
etc... 

10,000個以上のパーティションがあることを示しています。

この制限を回避する方法はありますか?このように多くのパーティションを既にどのように持っているかはわかりません。

2つの設定の環境的な違いはありますか?

ありがとうございます!

答えて

4

パーティション機能は、1日ごとに別々のパーティションを作成しています。それはたくさんのパーティションです! 2005年以降、これはおよそ365 * 7 = 2,555パーティションになります。あなたは本当に毎日別々のパーティションをしたいですか?

this articleによると、SQL Server 2008 SP2およびSQL Server 2008 R2 SP1では、制限が15,000パーティションに増加しました。サーバー間にサービスパックの違いはありますか?

Problem

SQL Server 2005 introduced table and index partitioning. Partitioning can make large tables and indexes more manageable and scalable. For more information about partitioning, see Partitioned Tables and Indexes (http://msdn.microsoft.com/en-us/library/ms188706(v=SQL.100).aspx). In SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2, the number of partitions is limited to 1,000.

Customers primarily use partitioning to facilitate the management of large fact tables in data warehouses. Data warehouse customers commonly load data as a batch. Daily loads are the most common pattern, but increasingly customers want to load data more than once a day. With the limit of 1,000 partitions, if customers load daily, they can store less than three years of data in a partitioned table, whereas business requirements often mandate that data be retained for longer periods of time, such as seven years. The 1,000 partitions maximum becomes a limitation for customers in this scenario.

If merging of partitions is too complex and time-consuming, customers prefer to have the flexibility to create a large number of partitions and use them as and when required. The 1,000 partitions maximum also becomes a limitation in this scenario.

Solution

In SQL Server 2008 SP2 and SQL Server 2008 R2 SP1, you can choose to enable support for 15,000 partitions at a database-level granularity by using the new sp_db_increased_partitions stored procedure. You can also disable support on a database (after it has been enabled) and set the limit on the number of partitions back to 1,000.

+0

多田:記事より引用

!あなたは正しいです、私たちはSP1を実行しています。ありがとうございました! – Khan

関連する問題