次の方法で共有


GrantPublicationAccess Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。 新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。

The GrantPublicationAccess method adds the specified login to the publication access list.

構文

object.GrantPublicationAccess(szLoginName)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • szLoginName
    String that identifies an existing Microsoft SQL Server login by name.

Prototype (C/C++)

HRESULT GrantPublicationAccess(SQLDMO_LPCSTR szLoginName);

説明

Granting privilege to a login using the GrantPublicationAccess method of the MergePublication or TransPublication object requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the system-defined role db_ownerin the published database, or a role with greater privilege.