sp_addsubscriber_schedule(Transact-SQL)

적용 대상:SQL ServerAzure SQL Managed Instance

배포 에이전트 및 병합 에이전트 일정을 추가합니다. 이 저장 프로시저는 모든 데이터베이스의 게시자에서 실행됩니다.

Transact-SQL 구문 표기 규칙

구문

sp_addsubscriber_schedule
    [ @subscriber = ] N'subscriber'
    [ , [ @agent_type = ] agent_type ]
    [ , [ @frequency_type = ] frequency_type ]
    [ , [ @frequency_interval = ] frequency_interval ]
    [ , [ @frequency_relative_interval = ] frequency_relative_interval ]
    [ , [ @frequency_recurrence_factor = ] frequency_recurrence_factor ]
    [ , [ @frequency_subday = ] frequency_subday ]
    [ , [ @frequency_subday_interval = ] frequency_subday_interval ]
    [ , [ @active_start_time_of_day = ] active_start_time_of_day ]
    [ , [ @active_end_time_of_day = ] active_end_time_of_day ]
    [ , [ @active_start_date = ] active_start_date ]
    [ , [ @active_end_date = ] active_end_date ]
    [ , [ @publisher = ] N'publisher' ]
[ ; ]

인수

[ @subscriber = ] N'subscriber'

구독자의 이름입니다. @subscriber 기본값이 없는 sysname입니다. @subscriber 데이터베이스에서 고유해야 하고, 존재하지 않아야 하며, 사용할 수 없습니다NULL.

[ @agent_type = ] agent_type

에이전트의 유형입니다. @agent_type smallint이며 이러한 값 중 하나일 수 있습니다.

설명
0(기본값) 배포 에이전트
1 병합 에이전트

[ @frequency_type = ] frequency_type

배포 에이전트 예약할 빈도를 지정합니다. @frequency_type int이며 이러한 값 중 하나일 수 있습니다.

설명
1 한 번
2 주문형
4 매일
8 매주
16 매월
32 월별 상대
64 (기본값) 자동 시작
128 되풀이

[ @frequency_interval = ] frequency_interval

frequency_type 설정된 빈도에 적용할 값입니다. @frequency_interval 기본값1int입니다.

[ @frequency_relative_interval = ] frequency_relative_interval

배포 에이전트 날짜입니다. 이 매개 변수는 frequency_type (월별 상대)로 설정 될 32사용 됩니다. @frequency_relative_interval int이며 이러한 값 중 하나일 수 있습니다.

설명
1(기본값) 첫 번째
2 두 번째
4 세 번째
8 네 번째
16 마지막

[ @frequency_recurrence_factor = ] frequency_recurrence_factor

frequency_type 사용되는 되풀이 요소입니다. @frequency_recurrence_factor 기본값0인 int입니다.

[ @frequency_subday = ] frequency_subday

정의된 기간 동안 다시 예약하는 빈도입니다. @frequency_subday int이며 이러한 값 중 하나일 수 있습니다.

설명
1 한 번
2 Second
4 (기본값) Minute
8 Hour

[ @frequency_subday_interval = ] frequency_subday_interval

frequency_subday 간격입니다. @frequency_subday_interval 기본값5int입니다.

[ @active_start_time_of_day = ] active_start_time_of_day

배포 에이전트 처음 예약되고 형식HHmmss이 지정된 하루 중 시간입니다. @active_start_time_of_day 기본값0인 int입니다.

[ @active_end_time_of_day = ] active_end_time_of_day

배포 에이전트 예약이 중지되고 형식이 HHmmss지정된 하루 중 시간입니다. @active_end_time_of_day 기본값235959인 int입니다. 즉, 24시간 시계에서 측정된 대로 오후 11시 59분 59분입니다.

[ @active_start_date = ] active_start_date

배포 에이전트 처음 예약된 날짜로 형식이 지정됩니다yyyyMMdd. @active_start_date 기본값0int입니다.

[ @active_end_date = ] active_end_date

배포 에이전트 예약이 중지되는 날짜로 yyyyMMdd형식이 지정됩니다. @active_end_date 기본값99991231인 int이며, 이는 9999년 12월 31일을 의미합니다.

[ @publisher = ] N'publisher'

SQL Server 이외 게시자를 지정합니다. @publisher sysname이며 기본값은 .입니다NULL.

@PUBLISHER SQL Server 게시자에 대해 지정해서는 안 됩니다.

반환 코드 값

0 (성공) 또는 1 (실패).

설명

sp_addsubscriber_schedule는 스냅샷 복제본(replica)tion, 트랜잭션 복제본(replica) 및 병합 복제본(replica)에 사용됩니다.

사용 권한

sysadmin 고정 서버 역할의 멤버만 실행할 sp_addsubscriber_schedule수 있습니다.