Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

sp_adddistpublisher

SQL Server 2000

  New Information - SQL Server 2000 SP3.

Configures a Publisher to use a specified distribution database. This stored procedure is executed at the Distributor on any database. Note that the stored procedures sp_adddistributor and sp_adddistributiondb must have been run prior to using this stored procedure.

Syntax

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 ]

Arguments

[@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. This parameter is used by replication agents to connect to the Publisher.

[@security_mode = ] security_mode

Is the implemented security mode. This parameter is used by replication agents to connect to the Publisher. security_mode is int, and can be one of these values.

Value Description
0 Replication agents at the Distributor use SQL Server Authentication to connect to the Publisher.
1 Replication agents at the Distributor use Windows Authentication to connect to the Publisher.
NULL (default) System will change the value to 0 if the server (Distributor) is running on the Windows® 98 operating system. System will change the value to 1 if the server (Distributor) is on a Windows NT® 4.0 or Windows 2000 operating system.

[@login = ] 'login'

Is the login. This parameter is required if security_mode is 0. login is sysname, with a default of sa. This parameter is used by replication agents to connect to the Publisher.

[@password = ] 'password']

Is the password. password is sysname, with a default of NULL. This parameter is used by replication agents to connect to the Publisher.

[@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). The name should be specified in UNC format.

[@trusted = ] 'trusted'

Is when the remote Publisher uses the same password as the local Distributor. trusted is nvarchar(5), and can be one of these values.

Value Description
True One trusted login mapping is added: sa to distributor_admin. Because the mapping is trusted, no password is needed at the remote Publisher to connect to the Distributor.
False (default) One nontrusted mapping is added: distributor_admin to distributor_admin. A password is needed at the remote Publisher to make a connection.

[@encrypted_password = ] encrypted_password

Specifies whether or not the supplied password should be encrypted. encrypted_password is bit, and can be one of these values.

Value Description
0 (default) Use when the value passed into the @password parameter is not already encrypted. Since this value has not been encrypted, the stored procedure takes the extra step of encrypting the password value.
1 Use when the value passed into the @password parameter has already been encrypted. Since this value has already been encrypted, the stored procedure does not execute any additional encryption processing.

Security Note  You should always encrypt persisted passwords. If you supply an unencrypted password for the @password parameter, you should set @encrypt_password to 0.

[@thirdparty_flag = ] thirdparty_flag

Is when the Publisher is Microsoft® SQL Server™. thirdparty_flag is bit, and can be one of these values.

Value Description
0 (default) Microsoft SQL Server database.
1 Database other than SQL Server.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_adddistpublisher is used by snapshot replication, transactional replication, and merge replication.

Permissions

Only members of the sysadmin fixed server role can execute sp_adddistpublisher.

See Also

sp_changedistpublisher

sp_dropdistpublisher

sp_helpdistpublisher

System Stored Procedures

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.