Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
Removes all clean buffers from the buffer pool, and columnstore objects from the columnstore object pool.
Transact-SQL syntax conventions
Syntax for SQL Server, Azure SQL Database, and serverless SQL pool in Azure Synapse Analytics:
DBCC DROPCLEANBUFFERS [ WITH NO_INFOMSGS ]
Syntax for Azure Synapse Analytics and Analytics Platform System (PDW):
DBCC DROPCLEANBUFFERS ( COMPUTE | ALL ) [ WITH NO_INFOMSGS ]
Suppresses all informational messages. Informational messages are always suppressed on Azure Synapse Analytics and Analytics Platform System (PDW).
Purge the data cache in memory from each Compute node.
Purge the data cache in memory from each Compute node and from the Control node. This setting is the default if you don't specify a value.
Use DBCC DROPCLEANBUFFERS
to test queries with a cold buffer cache without shutting down and restarting the server.
To drop clean buffers from the buffer pool and columnstore objects from the columnstore object pool, first use CHECKPOINT to produce a cold buffer cache. CHECKPOINT forces all dirty pages for the current database to be written to disk and cleans the buffers. After you checkpoint the database, you can issue DBCC DROPCLEANBUFFERS
command to remove all buffers from the buffer pool.
In Azure SQL Database, DBCC DROPCLEANBUFFERS
acts on the database engine instance hosting the current database or elastic pool. Executing DBCC DROPCLEANBUFFERS
in a user database drops clean buffers for that database. If the database is in an elastic pool, it also drops clean buffers in all other databases in that elastic pool. Executing the command in the master
database has no effect on other databases on the same logical server. Executing this command in a database using Basic, S0, or S1 service objective may drop clean buffers in other databases using these service objectives on the same logical server.
DBCC DROPCLEANBUFFERS
on SQL Server returns:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Applies to: SQL Server, Analytics Platform System (PDW)
Applies to: SQL Server 2022 and later
Applies to: Azure SQL Database
Applies to: Azure Synapse Analytics
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today