Partition Schema in SQL SERVER

This is needed for associating the partitions to a specific filegroups.

This is the second step in creating partitions.

The Syntax is as follows
CREATE PARTITION SCHEME AS PARTITION < Partition Function Name > TO (< Filegroup1 >,< Filegroup2 >,….)

The example below shows the creation of the same

CREATE PARTITION SCHEME EmployeePartitionScheme AS PARTITION EmployeePartitionLeft TO ([EmployeePartitionFG1], [EmployeePartitionFG2], [PRIMARY])


The below example shows if all reside on the same filegroup
 
CREATE PARTITION SCHEME EmployeePartitionScheme AS PARTITION EmployeePartitionLeft ALL TO (EmployeePartitionFG1)

Comments

Popular posts from this blog

Jesus - God Thinks of you.

ASP.NET 4.0 Feature - URL Routing

Tips on JQuery Intellisense in VS 2008