SubscriptionChronicle Constructor (SubscriptionClass, String)
Initializes a new instance of the SubscriptionChronicle class with a parent subscription class and a name.
네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Sub New ( _
subscriptionClass As SubscriptionClass, _
name As String _
)
public SubscriptionChronicle (
SubscriptionClass subscriptionClass,
string name
)
public:
SubscriptionChronicle (
SubscriptionClass^ subscriptionClass,
String^ name
)
public SubscriptionChronicle (
SubscriptionClass subscriptionClass,
String name
)
public function SubscriptionChronicle (
subscriptionClass : SubscriptionClass,
name : String
)
매개 변수
- subscriptionClass
The parent SubscriptionClass for the subscription chronicle.
name
A String, between 1 and 64 characters in length, that specifies the name of the subscription chronicle. This is a logical name, and not the name of the chronicle table, which you define using the SqlStatements property.You cannot change the name. To rename a subscription chronicle, you must remove the chronicle and then add a new chronicle that has a new name. For existing instances, you may need to rename the existing chronicle table so that you can copy data between it and the new chronicle.
주의
Subscription class names must conform to Microsoft SQL Server identifier naming conventions and must be unique within the application. For more information about SQL Server identifier naming conventions, see 식별자.
If you update the name, 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 응용 프로그램 업데이트.
예
The following examples show how to create a subscription chronicle:
// 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)
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
SubscriptionChronicle Class
SubscriptionChronicle Members
Microsoft.SqlServer.Management.Nmo Namespace
관련 자료
구독 클래스에 대한 기록 정의
Chronicle Element for SubscriptionClass/Chronicles (ADF)