Welcome to EMC Consulting Blogs Sign in | Join | Help

SSIS Junkie

Once upon a time this blog was a hive of activity. Now however its pretty lifeless as you can probably tell so if are pining for more of the same you can find me over at http://sqlblog.com/blogs/jamie_thomson. I look forward to seeing you there!

Restart SQL Server without restarting

Performance testing your T-SQL can be a drag. To do proper controlling of testing variables you essentially need to make sure that you're not running your statements against a server that has the data in cache. Previously the only way I knew of ensuring this was stopping and restarting SQL.

I've recently found out about a new technique. Just issue the following in Query Analyser:

DBCC DROPCLEANBUFFERS -- Clears the data cache
DBCC FREEPROCCACHE -- Clears the procedure cache

That's effectively a restart of your system. Very handy indeed!

 

UPDATE 2006-07-26: Check out how to do the same in Analysis Services!

 

Published 29 November 2004 12:49 by jamie.thomson
Filed under:

Comments

 

Jamie Thomson - Life, the universe and SSIS! said:

SQL Server guru Adam Machanic posted a really interesting post on his blog yesterday in regard to calculating...
February 28, 2006 14:30
 

Jamie Thomson - Life, the universe and SSIS! said:

SQL Server guru Adam Machanic posted a really interesting post on his blog yesterday in regard to calculating...
February 28, 2006 14:36
 

Jim 2.0 said:

Sometimes I will be writing a query and will be faced with the option of writing it in a number of different

February 3, 2007 19:16
 

SSIS Junkie said:

A long time ago I posted a blog entry explaining how to do an effective restart of SQL Server. I have

July 31, 2007 21:36
New Comments to this post are disabled

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems