This documentation is archived and is not being maintained.

SubscriptionClass.IndexSqlStatements Property

Gets the collection of Transact-SQL statements for creating one or more indexes for the subscription class.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

public StringCollection IndexSqlStatements { get; }
/** @property */
public StringCollection get_IndexSqlStatements ()

public function get IndexSqlStatements () : StringCollection

Property Value

A StringCollection containing the indexing Transact-SQL statements.

Indexing statements are optional.

Use the StringCollection methods to modify the collection of statements.

If you alter the indexing statements, updating the application re-creates the subscription class to which it corresponds. Notification Services renames the existing subscription tables by appending Old to the table name and then creates new tables. Existing subscription table indexes are left unchanged.

If you want to transfer data between the old and new subscription tables, it must be done manually. For more information, see Updating an Application.

The following examples show how to define an index on a subscription class:

// Add an index to the subscription class.
    "CREATE INDEX FlightSubscriptionsIndex ON " + 
    "MyAppSchema.FlightSubscriptions ( LeavingFrom, GoingTo )");

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms