sp_addsubscriber_schedule(Transact-SQL)

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

항목 링크 아이콘Transact-SQL 구문 표기 규칙

구문

sp_addsubscriber_schedule [ @subscriber = ] '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 = ] 'publisher' ]

인수

  • [ @subscriber=] 'subscriber'
    구독자의 이름입니다. subscribersysname입니다. 구독자의 이름은 데이터베이스에서 고유해야 하고 이미 존재해서는 안 되며 NULL이 될 수 없습니다.
  • [ @agent_type = ] agent_type
    에이전트의 유형입니다. agent_typesmallint이며 다음 값 중 하나일 수 있습니다.

    설명

    0(기본값)

    배포 에이전트

    1

    병합 에이전트

  • [ @frequency_type = ] frequency_type
    배포 에이전트를 예약하는 빈도입니다. frequency_typeint이며 다음 값 중 하나일 수 있습니다.

    설명

    1

    한 번

    2

    요청 시

    4

    매일

    8

    매주

    16

    매월

    32

    매월 상대적

    64(기본값)

    자동 시작

    128

    되풀이

  • [ @frequency_interval = ] frequency_interval
    frequency_type이 설정한 빈도에 적용할 값입니다. frequency_intervalint이며 기본값은 1입니다.
  • [ @frequency_relative_interval = ]frequency_relative_interval
    배포 에이전트의 날짜입니다. 이 매개 변수는 frequency_type32(매월 상대)로 설정되어 있을 때 사용됩니다. frequency_relative_intervalint이며 다음 값 중 하나일 수 있습니다.

    설명

    1(기본값)

    첫째

    2

    둘째

    4

    셋째

    8

    넷째

    16

    마지막

  • [ @frequency_recurrence_factor = ] frequency_recurrence_factor
    frequency_type에 사용되는 되풀이 비율입니다. frequency_recurrence_factorint이며 기본값은 0입니다.
  • [ @frequency_subday = ]frequency_subday
    정의된 기간 동안 다시 예약하는 빈도입니다. frequency_subdayint이며 다음 값 중 하나일 수 있습니다.

    설명

    1

    한 번

    2

    4(기본값)

    8

    시간

  • [ @frequency_subday_interval = ]frequency_subday_interval
    frequency_subday에 대한 간격입니다. frequency_subday_intervalint이며 기본값은 5입니다.
  • [ @active_start_time_of_day = ] active_start_time_of_day
    하루 중에서 배포 에이전트가 처음으로 실행되도록 예약된 시간이며 HHMMSS 형식으로 표시됩니다. active_start_time_of_dayint이며 기본값은 0입니다.
  • [ @active_end_time_of_day = ] active_end_time_of_day
    하루 중에서 배포 에이전트가 마지막으로 실행되도록 예약된 시간이며 HHMMSS 형식으로 표시됩니다. active_end_time_of_dayint이며 기본값은 24시간 시계를 기준으로 하여 오후 11시 59분 59초를 의미하는 235959입니다.
  • [ @active_start_date = ] active_start_date
    배포 에이전트가 처음으로 실행되도록 예약된 날짜이며 YYYYMMDD 형식으로 표시됩니다. active_start_dateint이며 기본값은 0입니다.
  • [ @active_end_date = ] active_end_date
    배포 에이전트가 마지막으로 실행되도록 예약된 날짜이며 YYYYMMDD 형식으로 표시됩니다. active_end_dateint이며 기본값은 9999년 12월 31일을 의미하는 99991231입니다.
  • [ @publisher = ] 'publisher'
    비-Microsoft SQL Server(Non-Microsoft SQL Server) 게시자를 지정합니다. publishersysname이며 기본값은 NULL입니다.

    [!참고] SQL Server 게시자에서는 publisher를 지정하면 안 됩니다.

반환 코드 값

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

주의

sp_addsubscriber_schedule은 스냅숏 복제, 트랜잭션 복제 및 병합 복제에 사용됩니다.

사용 권한

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

참고 항목

참조

sp_changesubscriber_schedule(Transact-SQL)
시스템 저장 프로시저(Transact-SQL)

도움말 및 정보

SQL Server 2005 지원 받기