---
title: "How to clear the cache in SQL Server Management Studio (SSMS)?"  
description: "How to clear the cache in SQL Server Management Studio (SSMS)?"  
author: "Ashutosh Patel"  
published: 2024-10-11  
updated: 2024-10-11  
canonical: https://www.mindstick.com/interview/33968/how-to-clear-the-cache-in-sql-server-management-studio-ssms  
category: "mssql server"  
tags: ["mssql server", "sql server", "sql", "cache"]  
reading_time: 2 minutes  

---

# How to clear the cache in SQL Server Management Studio (SSMS)?

### Clear the Cache in SQL

Clearing the cache in SQL Server Management Studio (SSMS) generally refers to clearing the plan cache or data cache in SQL Server. Here is how you can do that,

#### Clear Plan Cache

Execute the below SQL Command to clear the execution plan cache,

```plaintext
DBCC FREEPROCCACHE;
```

#### Clear Data Cache

Execute the below SQL Command to clear the Data cache (butter pool),

```plaintext
DBCC DROPCLEANBUFFERS;
```

#### Clear the Session Cache

To clear the session cache, execute the below SQL command,

```plaintext
DBCC FREESESSIONCACHE;
```

**Note-** Clearing the cache may temporarily impact performance, as SQL Server will need to recompile execution plans and reload data into memory.

## Answers

### Answer by Ashutosh Patel

### Clear the Cache in SQL

Clearing the cache in SQL Server Management Studio (SSMS) generally refers to clearing the plan cache or data cache in SQL Server. Here is how you can do that,

#### Clear Plan Cache

Execute the below SQL Command to clear the execution plan cache,

```plaintext
DBCC FREEPROCCACHE;
```

#### Clear Data Cache

Execute the below SQL Command to clear the Data cache (butter pool),

```plaintext
DBCC DROPCLEANBUFFERS;
```

#### Clear the Session Cache

To clear the session cache, execute the below SQL command,

```plaintext
DBCC FREESESSIONCACHE;
```

**Note-** Clearing the cache may temporarily impact performance, as SQL Server will need to recompile execution plans and reload data into memory.


---

Original Source: https://www.mindstick.com/interview/33968/how-to-clear-the-cache-in-sql-server-management-studio-ssms

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
