sp_adddistpublisher (języka Transact-SQL)

Konfiguruje Wydawca w celu używania bazy danych określonego rozkładu.Ta procedura przechowywana jest wykonywany na dystrybutor na dowolnej bazy danych.Należy zauważyć, że procedura przechowywana sp_adddistributor (języka Transact-SQL) i sp_adddistributiondb (Transact-SQL) musi mieć uruchomieniu jeszcze przed rozpoczęciem korzystania z tej procedura przechowywana.

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

sp_adddistpublisher [ @publisher= ] 'publisher' 
        , [ @distribution_db= ] 'distribution_db' 
    [ , [ @security_mode= ] security_mode ] 
    [ , [ @login= ] 'login' ] 
    [ , [ @password= ] 'password' ] 
    [ , [ @working_directory= ] 'working_directory' ] 
    [ , [ @trusted= ] 'trusted' ] 
    [ , [ @encrypted_password= ] encrypted_password ] 
    [ , [ @thirdparty_flag = ] thirdparty_flag ]
    [ , [ @publisher_type = ] 'publisher_type' ]

Argumenty

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

  • [ @distribution_db=] 'distribution_db'
    Is the name of the distribution database.distributor_db is sysname, with no default.Ten parametr jest używany przez agentów replikacja, aby połączyć się z Wydawca.

  • [ @security_mode=] security_mode
    Jest to tryb zabezpieczeń implementowane.This parameter is only used by replication agents to connect to the Publisher for queued updating subscriptions or with a non-SQL Server Publisher.security_mode is int, and can be one of these values.

    Wartość

    Description

    0

    Użyj replikacja agentów na dystrybutor SQL Server Uwierzytelnianie do łączenia się z Wydawca.

    1 (domyślnie)

    Agenci replikacja na dystrybutor za pomocą uwierzytelnianie systemu Windows do łączenia się z wydawcą.

  • [ @login=] 'login'
    Czy identyfikator logowania.This parameter is required if security_mode is 0.login is sysname, with a default of NULL.Ten parametr jest używany przez agentów replikacja, aby połączyć się z Wydawca.

  • [ @password=] 'password']
    Is the password.password is sysname, with a default of NULL.Ten parametr jest używany przez agentów replikacja, aby połączyć się z Wydawca.

    Security noteSecurity Note:

    Nie należy używać pustego hasła.Należy używać silnego hasła.

  • [ @working_directory=] 'working_directory'
    Is the name of the working directory used to store data and schema files for the publication.working_directory is nvarchar(255), and defaults to the ReplData folder for this instance of SQL Server, for example 'C:\Program Files\Microsoft SQL Server\MSSQL\MSSQ.1\ReplData'.Nazwa powinna być określona w formacie UNC.

  • [ @trusted=] 'trusted'
    This parameter has been deprecated and is provided for backward compatibility only.trusted is nvarchar(5), and setting it to anything but false will result in an error.

  • [ @encrypted_password=] encrypted_password
    Ustawienie encrypted_password nie jest już obsługiwany.Podjęto próbę zestaw to bit parametr1 spowoduje błąd.

  • [ @thirdparty_flag =] thirdparty_flag
    Is when the Publisher is SQL Server.thirdparty_flag is bit, and can be one of the following values.

    Wartość

    Description

    0 (domyślnie)

    SQL Server Baza danych.

    1

    Bazy danych innych niż SQL Server.

  • [ @ publisher_type= ] **"**publisher_type "
    Specifies the Publisher type when the Publisher is not SQL Server.publisher_type is sysname, and can be one of the following values.

    Wartość

    Description

    MSSQLSERVER 

    (domyślnie)

    Określa, SQL Server Wydawca.

    ORACLE

    Określa standardowy wydawca bazy danych Oracle.

    BRAMA ORACLE

    Określa Wydawca Gateway bazy danych Oracle.

    Aby uzyskać więcej informacji na temat różnic między Oracle Wydawca i Wydawca Gateway bazy danych Oracle zobacz Konfigurowanie Wydawca bazy danych Oracle.

Wartości kodów powrotnych

0 (sukces) lub 1 (brak)

Remarks

sp_adddistpublisher jest używany przez replikację migawka, replikacja transakcyjnej i replikacja łączenia.

Uprawnienia

Tylko członkowie sysadmin stała rola serwera mogą być wykonać sp_adddistpublisher.