Welcome

Passionately curious about Data, Databases and Systems Complexity. Data is ubiquitous, the database universe is dichotomous (structured and unstructured), expanding and complex. Find my Database Research at SQLToolkit.co.uk

"The important thing is not to stop questioning. Curiosity has its own reason for existing" Einstein



Tuesday, 2 June 2009

How to clean up a Database Server

CHECKPOINT
This will write all dirty buffers to disk so that when you run DBCC DROPCLEANBUFFERS, you can be assured that all data buffers are cleaned out.

DBCC DROPCLEANBUFFERS
To remove all the data from the buffers. This is useful to run between performance tests to ensure accurate testing results. This command only removes clean buffers.

DBCC FREEPROCCACHE
Clears out the stored procedure cache for all SQL Server databases.

DBCC ERRORLOG: Rarely restarting the SQL Server service can cause the server log to get very large and take a long time to load and view. This can be truncated (essentially creating a new log) by running DBCC ERRORLOG. Consider scheduling a regular job that runs this command once a week. The same thing can be done using sp_cycle_errorlog.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.