SQL Flow Field Guide

sp_replcmds

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spreplcmds returns the commands for transactions marked for replication.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Not stated in the Microsoft summary.

Syntax at a glance

sp_replcmds [ @maxtrans = ] maxtrans
[ ; ]

Work example

spreplcmds returns the commands for transactions marked for replication.

Read the warning and prerequisites. Describe the supported maintenance context without running the procedure.

Check your work When does Microsoft support using this internal procedure?

Open Microsoft Learn for full syntax, permissions, and details for your version.