ReplicationServer.InstallDistributor Method (String, String)

Registers a remote Distributor.

命名空間: Microsoft.SqlServer.Replication
組件: Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)

語法

'宣告
Public Sub InstallDistributor ( _
    distributionServerName As String, _
    password As String _
)
public void InstallDistributor (
    string distributionServerName,
    string password
)
public:
void InstallDistributor (
    String^ distributionServerName, 
    String^ password
)
public void InstallDistributor (
    String distributionServerName, 
    String password
)
public function InstallDistributor (
    distributionServerName : String, 
    password : String
)

參數

  • distributionServerName
    A String value that specifies the name of the remote server to be used as the Distributor for the current Publisher server. The distribution server name cannot be the same as the current server.
  • password
    A String value that specifies the password. This is the same value used when calling InstallDistributor at the Distributor.

備註

This method must be called from a Publisher to register the remote Distributor. If the Publisher and Distributor are on the same server, you should not call this method.

Before calling InstallDistributor(String,String), you must have called InstallDistributor(String,DistributionDatabase) at the Distributor.

The InstallDistributor method can only be called by a member of the sysadmin fixed server role.

The InstallDistributor method is equivalent to executing the sp_adddistributor (Transact-SQL) stored procedure at the Publisher to register a remote Distributor.

This namespace, class, or member is supported only in version 2.0 of the .NET Framework.

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

ReplicationServer Class
ReplicationServer Members
Microsoft.SqlServer.Replication Namespace