SQL Tips by Namwar Rizvi

June 5, 2007

Clearing Cache of SQL Server 2005

Query tuning excercises require cache flushing again and again. Following are the quick ways to flush SQL Server 2005 cache:

1. To clear data globally from SQL Server Cache use
DBCC DropCleanBuffers

2. To clear execution plan globally from SQL Server Cache use
DBCC FreeProcCache

2. To clear execution plan of a particular database from SQL Server Cache use
DBCC FlushProcInDB()

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: