DISTCOMMANDDESC Structure

Replication Programming

Replication Programming

DISTCOMMANDDESC Structure

This is the definition of the DISTCOMMANDDESC structure.

Syntax
typedef struct tagDISTCOMMANDDESC{
INT         PublicationID;
INT         ArticleID;
INT         CommandID;
DISTCMDTYPE   CommandType;
BOOL      fPartialCommand;
LPSTR      szCommand;
BYTE*      pXactID;
BYTE*      pXactSeqno;
LPSTR      szOriginator;
LPSTR      szOriginatorDB;
} DISTCOMMANDDESC;
Part Description
PublicationID Publication ID.
ArticleID Article ID.
CommandID Uniquely identifies commands within a transaction. Each command added to a transaction should have a unique, monotonically increasing command ID.
CommandType Identifies the type of the command. The Microsoft® SQL Server™ Distribution Agent can handle the following command types:
  • SQL_CMDTYPE_SQL = Transact-SQL command.

  • SQL_CMDTYPE_SCRIPT = File path to a Transact-SQL script file.

  • SQL_CMDTYPE_NATIVE_BCP = File path to a .bcp file in native format.

  • SQL_CMDTYPE_CHAR_BCP = File path to a .bcp file in character format.

  • SQL_CMDTYPE_WORKINGDIR = File path to the directory in which snapshot files are stored. Used by the Distribution Cleanup Agent.
fPartialCommand Determines whether the command wraps more than one row.
szCommand Command text.
pXactID Pointer to the transaction ID.
pXactSeqno Pointer to the transaction sequence number.
szOriginator Name of the originating server.
szOriginatorDB Name of the originating database.