Index.EnumFragmentation Index.EnumFragmentation Index.EnumFragmentation Method

Definition

Enumerates a list of fragmentation information for the index using the fast fragmentation option.

Overloads

EnumFragmentation() EnumFragmentation() EnumFragmentation()

Enumerates a list of fragmentation information for the index using the default fast fragmentation option.

EnumFragmentation(FragmentationOption) EnumFragmentation(FragmentationOption)

Enumerates a list of fragmentation information for the index with the specified fragmentation option.

EnumFragmentation(FragmentationOption, Int32) EnumFragmentation(FragmentationOption, Int32)

Enumerates a list of fragmentation information for the index with the specified fragmentation option and partition number.

EnumFragmentation() EnumFragmentation() EnumFragmentation()

Enumerates a list of fragmentation information for the index using the default fast fragmentation option.

public:
 System::Data::DataTable ^ EnumFragmentation();
public System.Data.DataTable EnumFragmentation ();
Public Function EnumFragmentation () As DataTable
Returns

A DataTable system object value that contains an enumerated list of fragmentation information.

Examples

Creating, Altering, and Removing Indexes

Remarks

This method is equivalent to fn_indexinfo for SQL Server 2016. The output format differs between different server versions.

Note

Indexes based on the UserDefinedTableType object cannot be modified and running this method will generate an exception.

EnumFragmentation(FragmentationOption) EnumFragmentation(FragmentationOption)

Enumerates a list of fragmentation information for the index with the specified fragmentation option.

public:
 System::Data::DataTable ^ EnumFragmentation(Microsoft::SqlServer::Management::Smo::FragmentationOption fragmentationOption);
public System.Data.DataTable EnumFragmentation (Microsoft.SqlServer.Management.Smo.FragmentationOption fragmentationOption);
Parameters
fragmentationOption
FragmentationOption FragmentationOption FragmentationOption

A FragmentationOption object value that specifies the fragmentation option.

Returns

A DataTable system object value that contains an enumerated list of fragmentation information.

Examples

Creating, Altering, and Removing Indexes

Remarks

This method is equivalent to fn_indexinfo for SQL Server 2016. The output format differs between different server versions.

Note

Indexes based on the UserDefinedTableType object cannot be modified and running this method will generate an exception.

EnumFragmentation(FragmentationOption, Int32) EnumFragmentation(FragmentationOption, Int32)

Enumerates a list of fragmentation information for the index with the specified fragmentation option and partition number.

public:
 System::Data::DataTable ^ EnumFragmentation(Microsoft::SqlServer::Management::Smo::FragmentationOption fragmentationOption, int partitionNumber);
public System.Data.DataTable EnumFragmentation (Microsoft.SqlServer.Management.Smo.FragmentationOption fragmentationOption, int partitionNumber);
Parameters
fragmentationOption
FragmentationOption FragmentationOption FragmentationOption

A FragmentationOption object value that specifies the fragmentation option.

partitionNumber
Int32 Int32 Int32

An Int32 value that specifies the partition number.

Returns

A DataTable system object value that contains an enumerated list of fragmentation information.

Examples

Creating, Altering, and Removing Indexes

Remarks

This method is equivalent to fn_indexinfo for SQL Server 2016. The output format differs between different server versions.

Note

Indexes based on the UserDefinedTableType object cannot be modified and running this method will generate an exception.

Applies to