SubscriptionClass.IndexSqlStatements Property
Gets the collection of Transact-SQL statements for creating one or more indexes for the subscription class.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public ReadOnly Property IndexSqlStatements As StringCollection
public StringCollection IndexSqlStatements { get; }
public:
property StringCollection^ IndexSqlStatements {
StringCollection^ get ();
}
/** @property */
public StringCollection get_IndexSqlStatements ()
public function get IndexSqlStatements () : StringCollection
Valeur de propriété
A StringCollection containing the indexing Transact-SQL statements.
Notes
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 Mise à jour d'une application.
Exemple
The following examples show how to define an index on a subscription class:
// Add an index to the subscription class.
flightSubscriptions.IndexSqlStatements.Add(
"CREATE INDEX FlightSubscriptionsIndex ON " +
"MyAppSchema.FlightSubscriptions ( LeavingFrom, GoingTo )");
' Add an index to the subscription class to help improve performance
flightSubscriptions.IndexSqlStatements.Add( _
"CREATE INDEX FlightSubscriptionsIndex ON " + _
"MyAppSchema.FlightSubscriptions ( LeavingFrom, GoingTo )")
Sécurité des threads
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.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
SubscriptionClass Class
SubscriptionClass Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
Définitions d'index pour une classe d'abonnement
IndexSqlSchema Element for SubscriptionClass (ADF)