sp_addmergepushsubscription_agent (Transact-SQL)

Dodaje nowe zadanie Agenta używanych do planowania synchronizacji subskrypcja wypychana do publikacja korespondencji seryjnej.Ta procedura przechowywana jest wykonywana przez wydawcę na baza danych publikacja.

Security noteSecurity Note:

Podczas konfigurowania przez wydawcę z dystrybutor zdalny wartości dostarczane dla wszystkich parametrów w tym job_login i job_password, są wysyłane do dystrybutor jako zwykły tekst. Należy zaszyfrować połączenie między Wydawca i jego dystrybutor zdalnym przed wykonaniem tej procedura przechowywana.Aby uzyskać więcej informacji zobacz Encrypting Connections to SQL Server.

Topic link iconKonwencje składni języka Transact-SQL

sp_addmergepushsubscription_agent [ @publication =] 'publication' 
    [ , [ @subscriber = ] 'subscriber' ] 
    [ , [ @subscriber_db = ] 'subscriber_db' ] 
    [ , [ @subscriber_security_mode = ] subscriber_security_mode ] 
    [ , [ @subscriber_login = ] 'subscriber_login' ] 
    [ , [ @subscriber_password = ] 'subscriber_password' ] 
    [ , [ @publisher_security_mode = ] publisher_security_mode ] 
    [ , [ @publisher_login = ] 'publisher_login' ] 
    [ , [ @publisher_password = ] 'publisher_password' ] 
    [ , [ @job_login = ] 'job_login' ] 
    [ , [ @job_password = ] 'job_password' ] 
    [ , [ @job_name = ] 'job_name' ] 
    [ , [ @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 ] 
    [ , [ @enabled_for_syncmgr = ] 'enabled_for_syncmgr' ] 

Argumenty

  • [ @publication = ] 'publication'
    Is the name of the publication.publication is sysname, with no default.

  • [ @subscriber = ] 'subscriber'
    Is the name of the Subscriber.subscriber is sysname, with a default of NULL.

  • [ @subscriber_db = ] 'subscriber_db'
    Is the name of the subscription database.subscriber_db is sysname, with a default of NULL.

  • [ @subscriber_security_mode = ] subscriber_security_mode
    Is the security mode to use when connecting to a Subscriber when synchronizing.subscriber_security_mode is int, with a default of 1.Jeśli 0Określa, ,SQL Server Uwierzytelnianie. Jeśli 1, określa uwierzytelnianie systemu Windows.

  • [ @subscriber_login = ] 'subscriber_login'
    Is the Subscriber login to use when connecting to a Subscriber when synchronizing.subscriber_login is required if subscriber_security_mode is set to 0.subscriber_login is sysname, with a default of NULL.

  • [ @subscriber_password = ] 'subscriber_password'
    Is the Subscriber password for SQL Server Authentication.subscriber_password is required if subscriber_security_mode is set to 0.subscriber_password is sysname, with a default of NULL.Jeśli używane jest hasło abonenta, są automatycznie szyfrowane.

    Security noteSecurity Note:

    Jeśli jest to możliwe, monituje użytkowników o wprowadzenie poświadczenia zabezpieczeń w czasie wykonywania.Jeśli poświadczenia muszą być przechowywane w pliku skryptu, należy zabezpieczyć plik, aby uniemożliwić nieautoryzowany dostęp.

  • [ @publisher_security_mode = ] publisher_security_mode
    Is the security mode to use when connecting to a Publisher when synchronizing.publisher_security_mode is int, with a default of 1.Jeśli 0Określa, ,SQL Server Uwierzytelnianie. Jeśli 1, określa uwierzytelnianie systemu Windows.

  • [ @publisher_login = ] 'publisher_login'
    Is the login to use when connecting to a Publisher when synchronizing.publisher_login is sysname, with a default of NULL.

  • [ @publisher_password = ] 'publisher_password'
    Is the password used when connecting to the Publisher.publisher_password is sysname, with a default of NULL.

    Security noteSecurity Note:

    Jeśli jest to możliwe, monituje użytkowników o wprowadzenie poświadczenia zabezpieczeń w czasie wykonywania.Jeśli poświadczenia muszą być przechowywane w pliku skryptu, należy zabezpieczyć plik, aby uniemożliwić nieautoryzowany dostęp.

  • [ @job_login = ] 'job_login'
    Is the login for the Windows account under which the agent runs.job_login is nvarchar(257), with a default value of NULL.Tego konta systemu Windows jest zawsze używana dla połączeń agenta dystrybutor i połączeń z subskrybent i Wydawca przy użyciu uwierzytelnianie zintegrowane systemu Windows.

  • [ @job_password = ] 'job_password'
    Is the password for the Windows account under which the agent runs.job_password is sysname, with no default.

    Security noteSecurity Note:

    Jeśli jest to możliwe, monituje użytkowników o wprowadzenie poświadczenia zabezpieczeń w czasie wykonywania.Jeśli poświadczenia muszą być przechowywane w pliku skryptu, należy zabezpieczyć plik, aby uniemożliwić nieautoryzowany dostęp.

  • [ @job_name = ] 'job_name'
    Is the name of an existing agent job.job_name is sysname, with a default value of NULL.Ten parametr jest określony tylko po zsynchronizowaniu subskrypcja przy użyciu istniejącego zadanie, a nie do nowo utworzonego zadanie (ustawienie domyślne).Jeśli nie jesteś członkiem sysadmin roli serwera stałe, należy określić job_login i job_password Po określeniu job_name.

  • [ @frequency_type = ] frequency_type
    Is the frequency with which to schedule the Merge Agent.frequency_type is int, and can be one of the following values.

    Wartość

    Description

    1

    Jeden raz

    2

    Na żądanie

    4

    Dzienne

    8

    Co tydzień

    16

    Miesięczne

    32

    Względna miesięczne

    64

    Autostart

    128

    Cykliczne

    NULL(default)

     

    Uwaga

    Określanie wartości 64 powoduje, że Agent korespondencji seryjnej do pracy w trybie ciągłym.Odpowiada to ustawieniu -Ciągłe parametr dla agenta.Aby uzyskać więcej informacji zobacz Agent replikacja w korespondencji seryjnej.

  • [ @frequency_interval = ] frequency_interval
    The days that the Merge Agent runs.frequency_interval is int, and can be one of the following values.

    Wartość

    Description

    1

    Niedziela

    2

    Poniedziałek

    3

    Wtorek

    4

    Środa

    5

    Czwartek

    6

    Piątek

    7

    Sobota

    8

    Dzień

    9

    Dni tygodnia

    10

    Dni weekendowe

    NULL(default)

     

  • [ @frequency_relative_interval = ] frequency_relative_interval
    Jest to data Agent korespondencji seryjnej.This parameter is used when frequency_type is set to 32 (monthly relative).frequency_relative_interval is int, and can be one of the following values.

    Wartość

    Description

    1

    First

    2

    Sekundy

    4

    Trzecia

    8

    Czwarty

    16

    Last

    NULL(default)

     

  • [ @frequency_recurrence_factor = ] frequency_recurrence_factor
    Is the recurrence factor used by frequency_type.frequency_recurrence_factor is int, with a default of NULL.

  • [ @frequency_subday = ] frequency_subday
    Is how often to reschedule during the defined period.frequency_subday is int, and can be one of the following values.

    Wartość

    Description

    1

    Tylko raz

    2

    Sekundy

    4

    Minuta

    8

    Godziny

    NULL(default)

     

  • [ @frequency_subday_interval = ] frequency_subday_interval
    Is the interval for frequency_subday.frequency_subday_interval is int, with a default of NULL.

  • [ @active_start_time_of_day = ] active_start_time_of_day
    Is the time of day when the Merge Agent is first scheduled, formatted as HHMMSS.active_start_time_of_day is int, with a default of NULL.

  • [ @active_end_time_of_day = ] active_end_time_of_day
    Is the time of day when the Merge Agent stops being scheduled, formatted as HHMMSS.active_end_time_of_day is int, with a default of NULL.

  • [ @active_start_date = ] active_start_date
    Is the date when the Merge Agent is first scheduled, formatted as YYYYMMDD.active_start_date is int, with a default of NULL.

  • [ @active_end_date = ] active_end_date
    Is the date when the Merge Agent stops being scheduled, formatted as YYYYMMDD.active_end_date is int, with a default of NULL.

  • [ @enabled_for_syncmgr = ] 'enabled_for_syncmgr'
    Specifies if the subscription can be synchronized through Windows Synchronization Manager.enabled_for_syncmgr is nvarchar(5), with a default of FALSE.Jeśli false, subskrypcja nie został zarejestrowany z menedżer synchronizacji. Jeśli true, subskrypcja jest zarejestrowany z menedżer synchronizacji i mogą być synchronizowane bez konieczności uruchamiania SQL Server Management Studio.

Wartości kodów powrotnych

0 (sukces) lub 1 (brak)

Remarks

sp_addmergepushsubscription_agent jest używany w replikacja łączenia i wykorzystuje funkcje podobne do sp_addpushsubscription_agent.

Uprawnienia

Tylko członkowie sysadmin Rola serwera lub db_owner ustalone rola bazy danych mogą być wykonać sp_addmergepushsubscription_agent.