SubscriptionChronicle Class
Represents a Notification Services application subscription chronicle, which is supplemental storage for subscription data.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public NotInheritable Class SubscriptionChronicle
Inherits NamedSmoObject
public sealed class SubscriptionChronicle : NamedSmoObject
public ref class SubscriptionChronicle sealed : public NamedSmoObject
public final class SubscriptionChronicle extends NamedSmoObject
public final class SubscriptionChronicle extends NamedSmoObject
Notes
Subscription chronicles are optional; use them only if you need to maintain subscription information outside of the subscription tables used by a subscription class. A common reason to use a subscription chronicle is to store and maintain when the subscription last produced a notification.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Management.Smo.SmoObjectBase
Microsoft.SqlServer.Management.Smo.SqlSmoObject
Microsoft.SqlServer.Management.Smo.NamedSmoObject
Microsoft.SqlServer.Management.Nmo.SubscriptionChronicle
Exemple
The following examples show how to define a subscription chronicle and add it to a subscription class:
// Define a chronicle for the subscription class
SubscriptionChronicle sc1 = new SubscriptionChronicle(
flightSubscriptions, "FlightSubChronicle");
sc1.SqlStatements.Add(
"CREATE TABLE MyAppSchema.FlightSubChronicle " +
" (SubscriptionId bigint, LeavingFrom nvarchar(6), " +
" GoingTo nvarchar(6), Price float);");
sc1.SqlStatements.Add(
"CREATE INDEX FlightSubChronicleIndex " +
" ON MyAppSchema.FlightSubChronicle " +
" ( LeavingFrom, GoingTo );");
flightSubscriptions.SubscriptionChronicles.Add(sc1);
' Define a chronicle for the subscription class
Dim sc1 As SubscriptionChronicle = New SubscriptionChronicle( _
flightSubscriptions, "FlightSubChronicle")
sc1.SqlStatements.Add( _
"CREATE TABLE MyAppSchema.FlightSubChronicle " + _
"(SubscriptionId bigint, LeavingFrom nvarchar(6), " + _
"GoingTo nvarchar(6), Price float);")
sc1.SqlStatements.Add( _
"CREATE INDEX FlightSubChronicleIndex " + _
"ON MyAppSchema.FlightSubChronicle " + _
"( LeavingFrom, GoingTo );")
flightSubscriptions.SubscriptionChronicles.Add(sc1)
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
SubscriptionChronicle Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
Définition de chroniques pour une classe d'abonnement
Chronicle Element for SubscriptionClass/Chronicles (ADF)