Log shipping flushing the buffer...??

Forum for users of Redgate's SQL Backup tool

Log shipping flushing the buffer...??

Postby swirl80 » Tue Sep 22, 2009 7:12 pm

Something i've noticed recently is that whenever we restore our log files (every 30mins) to what is our Live Reports server, it seems to flush the buffer and procedural cache. There's nothing in the script to do a dropcleanbuffers / freeproccache so i'm baffled!!!

So the cache is building up for 30mins (up to about 6.5GB) then flushes again, obviously this will affect performance but i'm stumped as to what or why this is happening.

Is this something redgate have in their sqlbackup extended stored procedure??

The process basically kills all users in order to get exclusive access to restore the log and loops through all databases. I thought it may have been the killusers part but tested that and it doesn't seem to flush.

SQL Server 2005 Std (9.0.4226) - 2x Quad Core, 8GB RAM
Windows Server 2003 Std SP2

any ideas???
Posts: 21
Joined: Thu Oct 23, 2008 3:26 pm

Postby petey » Wed Sep 23, 2009 1:56 am

I think that's what happens by design when you restore a full/log backup on SQL Server.

I did some quick tests on SQL Server 2000, and the buffer cache drops all cached data related to the database whose full/log backup you are now restoring. Makes sense since it does not know if the data it holds in the cache is now consistent with that in the database.

I can confirm that SQL Backup itself does not explicitly clear the cache during a restore.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Posts: 2358
Joined: Sun Apr 24, 2005 11:34 am

Postby swirl80 » Wed Sep 23, 2009 8:20 am

thanks for the info, suppose that does make sense i just wanted to confirm that there wasn't anything wrong with the server as i've recently built and deployed it like without noticing this!

I've tested on the old server we took out of production last week and got the same results.
Posts: 21
Joined: Thu Oct 23, 2008 3:26 pm

Return to SQL Backup Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest