Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 2.02 KB

sp-replflush-transact-sql.md

File metadata and controls

62 lines (44 loc) · 2.02 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_replflush (Transact-SQL)
sp_replflush flushes the article cache.
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_replflush
sp_replflush_TSQL
sp_replflush
TSQL

sp_replflush (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Flushes the article cache. This stored procedure is executed at the Publisher on the publication database.

Important

You shouldn't have to execute this procedure manually. You should only use sp_replflush for troubleshooting replication as directed by an experienced replication support professional.

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

Syntax

sp_replflush
[ ; ]

Arguments

None.

Return code values

0 (success) or 1 (failure).

Remarks

sp_replflush is used in transactional replication.

Article definitions are stored in the cache for efficiency. sp_replflush is used by other replication stored procedures whenever an article definition is modified or dropped.

Only one client connection can have log reader access to a given database. If a client has log reader access to a database, executing sp_replflush causes the client to release its access. Other clients can then scan the transaction log using sp_replcmds or sp_replshowcmds.

Permissions

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

Related content