sp_adddistributor (T-SQL)
Creates an entry in the sysservers table (if there is not one), marks it as the Distributor, and stores property information.
Syntax
sp_adddistributor [@distributor =] 'distributor'
[,[@heartbeat_interval =] heartbeat_interval]
[,[@password =] 'password']
Arguments
- [@distributor =] 'distributor'
- Is the Distributor server name. distributor is sysname, with no default. If setting up a remote Distributor, only this parameter is meaningful. It adds entries for the Distributor properties in the msdb..MSdistributor table.
- [@heartbeat_interval =] heartbeat_interval
- Is the maximum number of minutes that an agent can go without logging a progress message. heartbeat_interval is int, with a default of 10 minutes. A SQL Agent Job is created that wakes up on this interval to check the status of the replication agents that are running.
- [@password =] 'password']
- Is the password of the distributor_admin login. password is sysname, with a default of NULL. If NULL or N, password is reset to a random value. The password must be configured when the first remote distributor that is not trusted is added. distributor_admin login and password are stored for linked server entry used for a distributor RPC connection, including local connections. If distributor is local, the password for distributor_admin is set to a new value.
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_adddistributor is used in snapshot, transactional, and merge replication.
Permissions
Only members of the sysadmin fixed server role can execute sp_adddistributor.
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.