Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 cache and buffer

Author  Topic 

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-09-08 : 16:26:18
dbcc freeproccache
go
DBCC DROPCLEANBUFFERS
go


Do these commands clear the buffer and cache for 1 database or the entire server? like If i have 2 databases A and B. I run the commands on A. Will B's cache and buffer be cleared too?
How do i display the buffer and cache? i want to know before running the commands.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-08 : 16:51:14
It's at the instance level and not the database level.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-09-08 : 17:05:09
so if i run them in prodcution. it wont affect the users?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-08 : 17:07:25
It will affect the users. You are clearing everything from memory, so performance will be impacted.

But if there is a bad plan in cache and the query associated to the bad plan is causing performance issues, then running these actually might improve performance. We have this situation right now and are working with Microsoft to resolve it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -