Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.06 KB

sp-repltrans-transact-sql.md

File metadata and controls

56 lines (40 loc) · 2.06 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_repltrans (Transact-SQL)
sp_repltrans Returns a result set of all the transactions in the publication database transaction log that are marked for replication.
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_repltrans_TSQL
sp_repltrans
sp_repltrans
TSQL

sp_repltrans (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Returns a result set of all the transactions in the publication database transaction log that are marked for replication but aren't marked as distributed. This stored procedure is executed at the Publisher on a publication database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_repltrans
[ ; ]

Arguments

None.

Result set

sp_repltrans returns information about the publication database from which it's executed, allowing you to view transactions currently not distributed (those transactions remaining in the transaction log that aren't yet sent to the Distributor). The result set displays the log sequence numbers of the first and last records for each transaction. sp_repltrans is similar to sp_replcmds, but doesn't return the commands for the transactions.

Remarks

sp_repltrans is used in transactional replication.

sp_repltrans isn't supported for non-[!INCLUDE ssNoVersion] Publishers.

Permissions

Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_repltrans.

Related content