December 6, 2012

Partition Function Catalog Views

Se more view version maps here: Microsoft Sql System View Version Maps

sys.partition_parameters

parameter of a partition function.

Column name Sql 2005 Sql 2008 Sql 2008 R2 Sql 2012 Type Description
function_id int ID of the partition function to which this parameter belongs.
parameter_id int ID of the parameter. Is unique within the partition function, beginning with 1.
system_type_id tinyint ID of the system type of the parameter. Corresponds to the system_type_id column of the sys.types catalog view.
max_length smallint Maximum length of the parameter in bytes.
precision tinyint Precision of the parameter if numeric-based; otherwise, 0.
scale tinyint Scale of the parameter if numeric-based; otherwise, 0.
collation_name sysname Name of the collation of the parameter if character-based; otherwise, NULL.
user_type_id   int ID of the type. Is unique within the database. For system data types, user_type_id = system_type_id.

TSQL

Sql 2005
SELECT [function_id], [parameter_id], [system_type_id], [max_length], [precision], [scale], [collation_name] FROM sys.partition_parameters
Sql 2008
SELECT [function_id], [parameter_id], [system_type_id], [max_length], [precision], [scale], [collation_name], [user_type_id] FROM sys.partition_parameters
Sql 2008 R2
SELECT [function_id], [parameter_id], [system_type_id], [max_length], [precision], [scale], [collation_name], [user_type_id] FROM sys.partition_parameters
Sql 2012
SELECT [function_id], [parameter_id], [system_type_id], [max_length], [precision], [scale], [collation_name], [user_type_id] FROM sys.partition_parameters

Back to Top


sys.partition_range_values

range boundary value of a partition function of type R.

Column name Sql 2005 Sql 2008 Sql 2008 R2 Sql 2012 Type Description
function_id int ID of the partition function for this range boundary value.
boundary_id int ID (1-based ordinal) of the boundary value tuple, with left-most boundary starting at an ID of 1.
parameter_id int ID of the parameter of the function to which this value corresponds. The values in this column correspond with those in the parameter_id column of the sys.partition_parameters catalog view for any particular function_id.
value sql_variant The actual boundary value.

TSQL

Sql 2005
SELECT [function_id], [boundary_id], [parameter_id], [value] FROM sys.partition_range_values
Sql 2008
SELECT [function_id], [boundary_id], [parameter_id], [value] FROM sys.partition_range_values
Sql 2008 R2
SELECT [function_id], [boundary_id], [parameter_id], [value] FROM sys.partition_range_values
Sql 2012
SELECT [function_id], [boundary_id], [parameter_id], [value] FROM sys.partition_range_values

Back to Top

No comments:

Post a Comment

Total Pageviews