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

“Unable to retrieve the metadata for …” Error while using ASP.NET MVC 3

Building application using ASP.NET MVC and MongoDB

Getting Started with ASP.NET MVC, SignalR KnockoutJS