The <mssql-index-ddl> database configuration element

The <mssql-table-ddl> element in file database-config.xml can contain any number of occurrences of subelement <mssql-index-ddl>. The use of the <mssql-index-ddl> element is optional. Use this element to define SQL Server database DDL options for a specific index, based on the key columns. Any value that you set at this level overrides that same value set at the global, database level. You can create multiple <mssql-index-ddl> elements on the parent <mssql-table-ddl> element, each of which affects a different index.

The <mssql-index-ddl> element has the following syntax. The following code sample shows required attributes in bold font.

<database>
  <upgrade>
    <mssql-db-ddl>
      <mssql-table-ddl table-name="string">
        <mssql-index-ddl filter-where="string"index-compression="NONE|PAGE|ROW"
              index-filegroup="string"
              key-columns="string" partition-scheme="string"/>
      </mssql-table-ddl>
    </mssql-db-ddl>
  </upgrade>
</database>

The following list describes the attributes that you can configure on the <mssql-index-ddl> element.

key-columns

Required. Comma-delimited list of key columns, in order. Specify DESC after the column name for a descending sort order on the column.

The following attributes are all optional.

filter-where

Specifies an index filter to add after the WHERE keyword in the SQL Server CREATE INDEX ... WHERE statement. The filter that you create must conform to standard SQL Server rules.

index-compression

Specifies the compression setting for the specified index. Valid values are:

  • NONE
  • PAGE
  • ROW

If not specified, PolicyCenter uses the SQL Server database default.

index-filegroup

Name of the filegroup associated with this index. Do not use this attribute if you supply a value for the partition-scheme attribute as the two attributes are mutually exclusive.

partition-scheme

Name of a partition scheme for this index. Use of this attribute implies the use of PolicyCenter clustering. Do not use this attribute if you supply a value for the index-filegroups attribute as the two attributes are mutually exclusive.

The <mssql-index-ddl> element does not contain additional subelements.

See also