TransArticle 클래스

정의

트랜잭션 게시의 아티클을 나타냅니다.

public ref class TransArticle sealed : Microsoft::SqlServer::Replication::Article
public sealed class TransArticle : Microsoft.SqlServer.Replication.Article
type TransArticle = class
    inherit Article
Public NotInheritable Class TransArticle
Inherits Article
상속

예제

// Define the Publisher, publication, and article names.
string publisherName = publisherInstance;
string publicationName = "AdvWorksProductTran";
string publicationDbName = "AdventureWorks2012";
string articleName = "Product";
string schemaOwner = "Production";

TransArticle article;

// Create a connection to the Publisher.
ServerConnection conn = new ServerConnection(publisherName);

// Create a filtered transactional articles in the following steps:
// 1) Create the  article with a horizontal filter clause.
// 2) Add columns to or remove columns from the article.
try
{
    // Connect to the Publisher.
    conn.Connect();

    // Define a horizontally filtered, log-based table article.
    article = new TransArticle();
    article.ConnectionContext = conn;
    article.Name = articleName;
    article.DatabaseName = publicationDbName;
    article.SourceObjectName = articleName;
    article.SourceObjectOwner = schemaOwner;
    article.PublicationName = publicationName;
    article.Type = ArticleOptions.LogBased;
    article.FilterClause = "DiscontinuedDate IS NULL";

    // Ensure that we create the schema owner at the Subscriber.
    article.SchemaOption |= CreationScriptOptions.Schema;

    if (!article.IsExistingObject)
    {
        // Create the article.
        article.Create();
    }
    else
    {
        throw new ApplicationException(String.Format(
            "The article {0} already exists in publication {1}.",
            articleName, publicationName));
    }

    // Create an array of column names to remove from the article.
    String[] columns = new String[1];
    columns[0] = "DaysToManufacture";

    // Remove the column from the article.
    article.RemoveReplicatedColumns(columns);
}
catch (Exception ex)
{
    // Implement appropriate error handling here.
    throw new ApplicationException("The article could not be created.", ex);
}
finally
{
    conn.Disconnect();
}
' Define the Publisher, publication, and article names.
Dim publisherName As String = publisherInstance
Dim publicationName As String = "AdvWorksProductTran"
Dim publicationDbName As String = "AdventureWorks2012"
Dim articleName As String = "Product"
Dim schemaOwner As String = "Production"

Dim article As TransArticle

' Create a connection to the Publisher.
Dim conn As ServerConnection = New ServerConnection(publisherName)

' Create a filtered transactional articles in the following steps:
' 1) Create the  article with a horizontal filter clause.
' 2) Add columns to or remove columns from the article.
Try
    ' Connect to the Publisher.
    conn.Connect()

    ' Define a horizontally filtered, log-based table article.
    article = New TransArticle()
    article.ConnectionContext = conn
    article.Name = articleName
    article.DatabaseName = publicationDbName
    article.SourceObjectName = articleName
    article.SourceObjectOwner = schemaOwner
    article.PublicationName = publicationName
    article.Type = ArticleOptions.LogBased
    article.FilterClause = "DiscontinuedDate IS NULL"

    ' Ensure that we create the schema owner at the Subscriber.
    article.SchemaOption = article.SchemaOption Or _
    CreationScriptOptions.Schema

    If Not article.IsExistingObject Then
        ' Create the article.
        article.Create()
    Else
        Throw New ApplicationException(String.Format( _
         "The article {0} already exists in publication {1}.", _
         articleName, publicationName))
    End If

    ' Create an array of column names to remove from the article.
    Dim columns() As String = New String(0) {}
    columns(0) = "DaysToManufacture"

    ' Remove the column from the article.
    article.RemoveReplicatedColumns(columns)
Catch ex As Exception
    ' Implement appropriate error handling here.
    Throw New ApplicationException("The article could not be created.", ex)
Finally
    conn.Disconnect()
End Try

설명

스레드 보안

이 유형의 모든 공용 정적(Shared Microsoft Visual Basic의 경우) 멤버는 다중 스레드 작업에 안전합니다. 인스턴스 구성원은 스레드로부터의 안전성이 보장되지 않습니다.

생성자

TransArticle()

TransArticle 클래스의 새 인스턴스를 만듭니다.

TransArticle(String, String, String, ServerConnection)

필수 속성과 Microsoft SQL Server 인스턴스 TransArticle 에 대한 지정된 연결을 사용하여 클래스의 새 인스턴스를 만듭니다.

속성

ArticleId

아티클 ID 값을 가져옵니다.

(다음에서 상속됨 Article)
ArticleLogTablespace

복제 로그 정보를 저장하는 데 사용되는 Oracle 테이블스페이스의 이름을 가져오거나 설정합니다.

CachePropertyChanges

복제 속성에 대한 변경 내용을 캐시할지 아니면 즉시 적용할지를 가져오거나 설정합니다.

(다음에서 상속됨 ReplicationObject)
CommandFormat

아티클에 대한 변경 내용이 전파되는 방식을 가져오거나 설정합니다.

ConnectionContext

Microsoft SQL Server 인스턴스에 대한 연결을 가져오거나 설정합니다.

(다음에서 상속됨 ReplicationObject)
CreateArticleAsHeterogeneous

아티클을 다른 유형으로 만들지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
CreationScript

구독자에서 대상 개체를 만드는 데 사용되는 Transact-SQL 스크립트 파일의 이름과 전체 경로를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
DatabaseName

아티클에 게시되는 개체 및 데이터를 포함하는 데이터베이스의 이름을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
DatatypeMappingOptions

SQL Server 이외의 게시자에 기본 아티클 데이터 형식 매핑이 사용되는지 여부를 반환합니다.

DeleteCommand

삭제 내용을 복제하는 데 사용되는 명령을 가져오거나 설정합니다.

Description

아티클에 대한 텍스트 설명을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
DestinationObjectName

구독자에서 아티클에 대한 원본 데이터베이스 개체로 사용되는 데이터베이스 개체를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
DestinationObjectOwner

구독자에서 아티클에 대한 원본 데이터베이스 개체의 스키마 소유자를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
FilterClause

아티클을 가로로 필터링하는 데 사용되는 WHERE 절을 가져오거나 설정합니다.

FilterProcName

테이블을 행 필터링하는 데 사용되는 저장 프로시저(FOR REPLICATION을 사용하여 만들어짐)를 가져오거나 설정합니다.

FilterProcOwner

테이블 기반 아티클을 수평 분할하는 데 사용되는 저장 프로시저를 소유하는 데이터베이스 사용자를 가져오거나 설정합니다.

IdentityRangeManagementOption

아티클에 대한 ID 범위 관리 옵션을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
IdentityRangeThreshold

새 범위의 ID 열 값이 게시자 또는 구독자에 할당되는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
InsertCommand

삽입 내용을 복제하는 데 사용되는 명령을 가져오거나 설정합니다.

IsExistingObject

서버에 개체가 있는지 여부를 가져옵니다.

(다음에서 상속됨 ReplicationObject)
Name

아티클 이름을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
PreCreationMethod

게시된 개체가 구독 데이터베이스에 이미 있는 경우 수행할 동작을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
PublicationName

아티클이 속한 게시의 이름을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
PublisherIdentityRangeSize

게시자의 테이블 열에 할당된 ID 값의 범위를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
PublisherName

아티클을 게시하는 SQL Server 이외의 게시자 이름을 가져오거나 설정합니다.

SchemaOption

아티클에 대한 스키마 만들기 옵션을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
SnapshotObjectName

아티클에 대한 초기 데이터 스냅샷을 제공하는 데이터베이스 개체를 가져오거나 설정합니다.

SnapshotObjectOwner

아티클에 대한 초기 데이터 스냅샷을 제공하는 데이터베이스 개체의 소유자를 가져오거나 설정합니다.

SourceObjectName

게시되는 데이터베이스 개체의 이름을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
SourceObjectOwner

게시되는 데이터베이스 개체의 소유자를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
SqlServerName

이 개체가 연결된 Microsoft SQL Server 인스턴스의 이름을 가져옵니다.

(다음에서 상속됨 ReplicationObject)
SubscriberIdentityRangeSize

다른 ID 범위를 할당해야 하기 전에 구독자에서 테이블의 ID 열에 삽입할 수 있는 최대 새 행 수를 가져오거나 설정합니다.

(다음에서 상속됨 Article)
Type

아티클 유형을 가져오거나 설정합니다.

(다음에서 상속됨 Article)
UpdateCommand

업데이트 내용을 복제하는 데 사용되는 명령을 가져오거나 설정합니다.

UserData

사용자가 자신의 고유 데이터를 개체에 연결할 수 있도록 하는 개체 속성을 가져오거나 설정합니다.

(다음에서 상속됨 ReplicationObject)
VerticalPartition

모든 열이 테이블 아티클에 게시되는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Article)

메서드

AddReplicatedColumns(Array)

수직 분할된 테이블 아티클에 열을 포함합니다.

CheckValidCreation()

유효한 아티클 생성을 확인합니다.

(다음에서 상속됨 Article)
CheckValidDefinition(Boolean)

정의가 유효한지 여부를 나타냅니다.

(다음에서 상속됨 Article)
CommitPropertyChanges()

캐시된 모든 속성 변경 문을 Microsoft SQL Server 인스턴스로 보냅니다.

(다음에서 상속됨 ReplicationObject)
Create()

개체 또는 개체의 현재 속성을 기반으로 현재 연결된 SQL Server 인스턴스에 새 아티클을 TransArticleMergeArticle 만듭니다.

(다음에서 상속됨 Article)
Decouple()

참조된 복제 개체를 서버에서 분리합니다.

(다음에서 상속됨 ReplicationObject)
EnumHeterogeneousColumns()

SQL Server 이외의 게시자에서 게시하는 테이블 아티클에 대한 열 정보를 반환합니다.

GetChangeCommand(StringBuilder, String, String)

복제에서 변경 명령을 반환합니다.

(다음에서 상속됨 ReplicationObject)
GetCreateCommand(StringBuilder, Boolean, ScriptOptions)

복제에서 생성 명령을 반환합니다.

(다음에서 상속됨 ReplicationObject)
GetDropCommand(StringBuilder, Boolean)

복제에서 삭제 명령을 반환합니다.

(다음에서 상속됨 ReplicationObject)
InternalRefresh(Boolean)

복제에서 내부 새로 고침을 시작합니다.

(다음에서 상속됨 ReplicationObject)
ListReplicatedColumns()

테이블 아티클에서 게시된 열을 반환합니다.

Load()

서버에서 기존 개체의 속성을 로드합니다.

(다음에서 상속됨 ReplicationObject)
LoadProperties()

서버에서 기존 개체의 속성을 로드합니다.

(다음에서 상속됨 ReplicationObject)
Refresh()

개체의 속성을 다시 로드합니다.

(다음에서 상속됨 ReplicationObject)
Remove()

개체 또는 개체의 현재 속성을 기반으로 현재 연결된 SQL Server 인스턴스에서 기존 아티클을 TransArticleMergeArticle 제거합니다.

(다음에서 상속됨 Article)
RemoveReplicatedColumns(Array)

수직 분할된 테이블 아티클에서 열을 제외합니다.

Script(ScriptOptions)

서버에서 개체 또는 개체를 만들거나 삭제 TransArticle 하기 위해 실행할 수 있는 Transact-SQL 스크립트를 MergeArticle 생성합니다.

(다음에서 상속됨 Article)
ScriptChangeColumnDestinationDataType(String, String, Int64, Int32, Int64, ScriptOptions)

SQL Server 이외 게시자에 대한 열 데이터 형식 매핑을 변경하는 데 사용되는 Transact-SQL 스크립트를 반환합니다.

SetColumnDestinationDataType(String, String, Int64, Int32, Int64)

SQL Server 이외의 게시자에 대한 열 데이터 형식 매핑을 설정합니다.

적용 대상

추가 정보