Creates a remote Publisher that uses the local Distributor.
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
Value | Description |
---|---|
0 | SQL Server Authentication security. Used when Distributor is running on Microsoft Windows® 95. |
1 | Windows NT Authentication security. Used when Distributor is running on Microsoft® Windows NT®. |
NULL (default) | Set to 0 or 1 according to the platform used. |
This parameter is used by replication agents to connect to the Publisher.
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. SQL Server 6.x Publishers should be created as trusted. |
false | One nontrusted mapping is added, distributor_admin to distributor_admin. A password is needed at the remote Publisher to make a connection. |
NULL (default) | If the distribution Publisher is local, the default is nontrusted. Any password set for the Distributor is also set for the local distribution Publisher (linked server connection back to local Distributor). If the distribution Publisher is remote, the default is trusted and no password is needed at the remote Publisher. If the user directly changes the distributor_admin password instead of using sp_changedistributor_password, the local link is broken. |
Value | Description |
---|---|
0 (default) | Microsoft SQL Server |
1 | Data source other than Microsoft SQL Server |
0 (success) or 1 (failure)
sp_adddistpublisher is used by snapshot, transactional, and merge replication.
Only members of the sysadmin fixed server role can execute sp_adddistpublisher.
sp_changedistpublisher | sp_helpdistpublisher |
sp_dropdistpublisher | System Stored Procedures |