sp_replmonitorhelpmergesessiondetail (Transact-SQL)


Applies To: SQL Server

Returns detailed, article-level information about a specific replication Merge Agent session, which is used to monitor merge replication. The result set includes a detail row for each article that was synchronized during the session. It also includes a row that represents the session initialization and rows that summarize both the upload and download phases of the session. This stored procedure is executed at the Distributor on the distribution database, or at the Subscriber on the subscription database.

Topic link icon Transact-SQL Syntax Conventions

sp_replmonitorhelpmergesessiondetail [ @session_id = ] session_id  

[ @session_id = ] session_id
Specifies an agent session. session_id is int with no default.

Column nameData typeDescription
PhaseIDintIs the phase of the synchronization session, which can be one of the following:

 0 = Initialization or summary row

 1 = Upload

 2 = Download
ArticleNamesysnameIs the name of the article being synchronized. ArticleName also contains summary information for rows in the result set that do not represent article details.
PercentCompletedecimalIndicates the percent of the total changes applied in a given article detail row for currently running or failed sessions.
RelativeCostdecimalIndicates the time spent synchronizing the article as a percentage of the total synchronization time for the session.
DurationintLength of the agent session.
InsertsintNumber of inserts in a session.
UpdatesintNumber of updates in a session.
DeletesintNumber of deletes in a session.
ConflictsintNumber of conflicts that occurred in a session.
ErrorIDintID of a session error.
SeqNointOrder of sessions in the result set.
RowTypeintIndicates what type of information each row in the result set represents.

 0 = initialization

 1 = upload summary

 2 = article upload detail

 3 = download summary

 4 = article download detail
SchemaChangesintNumber of schema changes in a session.

0 (success) or 1 (failure)

sp_replmonitorhelpmergesessiondetail is used to monitor merge replication.

When executed on the Subscriber, sp_replmonitorhelpmergesessiondetail only returns detailed information about the last 5 Merge Agent sessions.

Only members of the db_owner or replmonitor fixed database role on the distribution database at the Distributor or on the subscription database at the Subscriber can execute sp_replmonitorhelpmergesessiondetail.

Programmatically Monitor Replication

Community Additions