방법: Oracle 게시자에 대한 트랜잭션 세트 작업 구성(복제 Transact-SQL 프로그래밍)

Xactset 작업은 로그 판독기 에이전트가 Oracle 게시자에 연결되어 있지 않을 때 해당 게시자에서 트랜잭션 세트를 만들기 위해 실행되는 복제를 통해 만들어지는 Oracle 데이터베이스 작업입니다. 배포자에서 복제 저장 프로시저를 사용하여 프로그래밍 방식으로 이 작업을 사용하도록 설정하고 구성할 수 있습니다. 자세한 내용은 Oracle 게시자를 위한 성능 튜닝을 참조하십시오.

트랜잭션 세트 작업을 사용하도록 설정하려면

  1. Oracle 게시자에서 job_queue_processes 초기화 매개 변수를 Xactset 작업을 실행하기에 충분한 값으로 설정합니다. 이 매개 변수에 대한 자세한 내용은 Oracle 게시자의 데이터베이스 설명서를 참조하십시오.

  2. 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름, @propertyname에 대해 값 xactsetbatching, @propertyvalue에 대해 값 enabled를 지정합니다.

  3. 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름, @propertyname에 대해 값 xactsetjobinterval, @propertyvalue에 대해 작업 간격(분)을 지정합니다.

  4. 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름, @propertyname에 대해 값 xactsetjob, @propertyvalue에 대해 값 enabled를 지정합니다.

트랜잭션 세트 작업을 구성하려면

  1. (옵션) 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름을 지정합니다. 이렇게 하면 게시자에서 Xactset 작업의 속성이 반환됩니다.

  2. 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름, @propertyname에 대해 설정할 Xactset 작업 속성의 이름, @propertyvalue에 대해 새 설정을 지정합니다.

  3. (옵션) 설정할 각 Xactset 작업 속성에 대해 2단계를 반복합니다. xactsetjobinterval 속성을 변경하는 경우 Oracle 게시자의 작업을 다시 시작해야 새 간격이 적용됩니다.

트랜잭션 세트 작업의 속성을 보려면

  • 배포자에서 sp_helpxactsetjob을 실행합니다. @publisher에 대해 Oracle 게시자의 이름을 지정합니다.

트랜잭션 세트 작업을 사용하지 않도록 설정하려면

  • 배포자에서 sp_publisherproperty(Transact-SQL)를 실행합니다. @publisher에 대해 Oracle 게시자의 이름, @propertyname에 대해 값 xactsetjob, @propertyvalue에 대해 값 disabled를 지정합니다.

다음 예제에서는 Xactset 작업을 사용하도록 설정하고 실행 간격을 3분으로 설정합니다.

-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables  
-- on the command line and in SQL Server Management Studio, see the 
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".

DECLARE @publisher AS sysname;
SET @publisher = $(Publisher);

-- Enable the creation of transaction sets
-- at the Oracle Publisher.
EXEC sp_publisherproperty 
  @publisher = @publisher, 
  @propertyname = N'xactsetbatching', 
  @propertyvalue = N'enabled';

-- Set the job interval before enabling
-- the job, otherwise the job must be restarted.
EXEC sp_publisherproperty 
  @publisher = @publisher, 
  @propertyname = N'xactsetjobinterval', 
  @propertyvalue = N'3';

-- Enable the transaction set job.
EXEC sp_publisherproperty 
  @publisher = @publisher, 
  @propertyname = N'xactsetjob', 
  @propertyvalue = N'enabled';
GO