PUBLISHINGSERVERNAME
replication metadata lookup
What changes
- Input
- replication metadata
- Output or change
- server name
- Return type
- nvarchar
Syntax at a glance
PUBLISHINGSERVERNAME()
Work example
Inspect a publishing server name while diagnosing an existing replication setup.
Compare the result with the configured publisher and subscriber roles before changing topology.
Check your work The function returns replication context and is not a general server identity check.
Open Microsoft Learn for full syntax, permissions, and details for your version.