| title | sp_replflush (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/03/2017 | ||
| ms.prod | sql-server-2016 | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| applies_to |
|
||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 20809f5f-941d-427f-8f0c-de7a6c487584 | ||
| caps.latest.revision | 17 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Flushes the article cache. This stored procedure is executed at the Publisher on the publication database.
Important
You should not have to execute this procedure manually. sp_replflush should only be used for troubleshooting replication as directed by an experienced replication support professional.
Transact-SQL Syntax Conventions
sp_replflush
0 (success) or 1 (failure)
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.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_replflush.
sp_replcmds (Transact-SQL)
sp_repldone (Transact-SQL)
sp_repltrans (Transact-SQL)
System Stored Procedures (Transact-SQL)