共用方式為


ReplicationSecurity Object

未來的 Microsoft SQL Server 版本將移除這項功能。請避免在新的開發工作中使用這項功能,並規劃修改目前使用這項功能的應用程式。

The ReplicationSecurity object represents authentication information used when connecting to a Distributor or Publisher. It is commonly used with pull and anonymous subscriptions.

顯示目前物件的 SQL-DMO 物件模型

備註

With the ReplicationSecurity object, you can:

  • Enable Windows Authentication.

  • Enable SQL Server Authentication.

To enable Windows Authentication

  • Set the SecurityMode property to SQLDMOReplSecurity_Integrated.

To enable SQL Server Authentication

  1. Set the SecurityMode property to SQLDMOReplSecurity_Normal.

  2. Set the StandardLogin property to a Microsoft SQL Server login.

  3. Set the StandardPassword property to the password for the SQL Server login.