Freigeben über


GrantPublicationAccess Method

Dieses Feature wird in einer zukünftigen Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

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

Syntax

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);

Hinweise

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_owner in the published database, or a role with greater privilege.

Applies To:

MergePublication Object

TransPublication Object