sp_changepublication_snapshot (języka Transact-SQL)

Zmienia właściwości agenta migawki dla określonej publikacja.Ta procedura składowana jest wykonywany na Wydawca na bazie publikacja.

Uwaga dotycząca zabezpieczeńUwaga dotycząca zabezpieczeń

Podczas konfigurowania Publisher z dystrybutor zdalny, wartości dostarczone dla wszystkich parametrów, łącznie z job_login i job_password, są wysyłane do dystrybutora jako zwykły tekst.Należy zaszyfrować połączenie między wydawcy i jego dystrybutor zdalny przed wykonywania tej procedura składowana.Aby uzyskać więcej informacji, zobacz Szyfrowania połączeńSQL Server.

Ikona łącza do tematuKonwencje składni Transact-SQL

Składnia

sp_changepublication_snapshot [ @publication= ] 'publication'
    [ , [ @frequency_type= ] frequency_type ]
    [ , [ @frequency_interval= ] frequency_interval ]
    [ , [ @frequency_subday= ] frequency_subday ]
    [ , [ @frequency_subday_interval= ] frequency_subday_interval ]
    [ , [ @frequency_relative_interval= ] frequency_relative_interval ]
    [ , [ @frequency_recurrence_factor= ] frequency_recurrence_factor ]
    [ , [ @active_start_date= ] active_start_date ]
    [ , [ @active_end_date= ] active_end_date ]
    [ , [ @active_start_time_of_day= ] active_start_time_of_day ]
    [ , [ @active_end_time_of_day= ] active_end_time_of_day ]
    [ , [ @snapshot_job_name = ] 'snapshot_agent_name' ]
    [ , [ @publisher_security_mode = ] publisher_security_mode ]
    [ , [ @publisher_login = ] 'publisher_login' ]
    [ , [ @publisher_password = ] 'publisher_password' ] 
    [ , [ @job_login = ] 'job_login' ]
    [ , [ @job_password = ] 'job_password' ]
    [ , [ @publisher = ] 'publisher' ]

Argumenty

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

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

    Wartość

    Opis

    1

    Jedenczas

    2

    Na żądanie

    4

    Dzienny

    8

    Tygodniowy

    16

    Miesięczne

    32

    Miesięczne względna

    64

    Autostart

    128

    Cykliczne

    NULL(default)

     

  • [ @ frequency_interval = frequency_interval
    Specifies the days that the agent runs.frequency_interval is int, and can be one of the following values.

    Wartość

    Opis

    1

    Niedziela

    2

    Poniedziałek

    3

    Wtorek

    4

    Środa

    5

    Czwartek

    6

    Piątek

    7

    Sobota

    8

    Dzień

    9

    Dni powszednie

    10

    Dni weekendowe

    NULL(default)

     

  • [ @ frequency_subday = frequency_subday
    Is the units for freq_subday_interval.frequency_subday is int, and can be one of these values.

    Wartość

    Opis

    1

    Raz

    2

    Drugie

    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.

  • [ @ frequency_relative_interval = frequency_relative_interval
    Is the date the Snapshot Agent runs.frequency_relative_interval is int, with a default of NULL.

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

  • [ @ active_start_date = active_start_date
    Is the date when the Snapshot 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 Snapshot Agent stops being scheduled, formatted as YYYYMMDD.active_end_date is int, with a default of NULL.

  • [ @ active_start_time_of_day = active_start_time_of_day
    Is the time of day when the Snapshot 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 Snapshot Agent stops being scheduled, formatted as HHMMSS.active_end_time_of_day is int, with a default of NULL.

  • [ @ snapshot_job_name = 'snapshot_agent_name"
    Is the name of an existing Snapshot Agent job name if an existing job is being used.snapshot_agent_name is nvarchar(100) with a default value of NULL.

  • [ @ publisher_security_mode = publisher_security_mode
    Is the security mode used by the agent when connecting to the Publisher.publisher_security_mode is smallint, with a default of NULL.0 Określa SQL Server uwierzytelniania, i 1 Określa uwierzytelnianie systemu Windows.Wartość 0 musi być określona dla nie-SQL Server wydawcy.

    Uwaga dotycząca zabezpieczeńUwaga dotycząca zabezpieczeń

    Gdy jest to możliwe, należy używać uwierzytelniania systemu Windows.

  • [ @ publisher_login = 'publisher_login"
    Is the login used when connecting to the Publisher.publisher_login is sysname, with a default of NULL.publisher_login must be specified when publisher_security_mode is 0.Jeśli publisher_login ma wartość NULL i publisher_security_mode jest 1, a następnie konto systemu Windows, określone w job_login jest używany przy łączeniu się z Wydawca.

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

    Uwaga dotycząca zabezpieczeńUwaga dotycząca zabezpieczeń

    Nie należy używać pustego hasła.Należy używać silnego hasła.Jeśli to możliwe, monitują 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 of NULL.To konto systemu Windows jest zawsze używana dla połączeń agenta do dystrybutora.Ten parametr należy podać podczas tworzenia nowego zadanie agenta migawki.Nie można zmienić dla nie-SQL Server wydawcy.

  • [ @ job_password = 'job_password"
    Is the password for the Windows account under which the agent runs.job_password is sysname, with a default of NULL.Ten parametr należy podać podczas tworzenia nowego zadanie agenta migawki.

    Uwaga dotycząca zabezpieczeńUwaga dotycząca zabezpieczeń

    Jeśli to możliwe, monitują 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 = 'publisher"
    Specifies a non-SQL Server publisher.publisher is sysname, with a default of NULL.

    Ostrzeżenie

    publishernie należy używać podczas tworzenia agenta migawki na SQL Server Wydawca.

Wartości kodów powrotnych

0 (sukces) lub 1 (błąd)

Uwagi

sp_changepublication_snapshot w replikacja migawka, replikacja transakcyjna i scalania replikacji.

Uprawnienia

Tylko członkowie sysadmin stała rola serwera lub db_owner ustaloną rola bazy danych można wykonać sp_changepublication_snapshot.