Copying large files when running SQL Server

Copying large files has always been a pain on a SQL Server as it can result in the OS taking memory from SQL. This is something you don’t want to happen. In the past, and probably still, it can cause

What i noticed recently on my windows 7 machine was that xcopy now allows for unbuffered copying of files. This means it shouldn’t use the OS memory and thus push try and take some memory of SQL Server.

The option is /J and is described by “Copies using unbuffered I/O. Recommended for very large files.”. I haven’t seen it on a server yet so maybe on a server it is always unbuffered.

I wonder if you can just copy Xcopy from a windows 7 machine to a 2008 machine. I can’t see why not.

Here are the current options

image

Published 23 August 2010 19:28 by simonsabin
Filed under:

Comments

25 August 2010 10:52 by GrumpyOldDBA

# re: Copying large files when running SQL Server

I only ever use robocopy and can't say I've ever had a problem on a server. I use robocopy for log shipping and backup shipping, have done since NT 3.5 I think when robocopy first came to my attention.

I agree that copies on a PC are different, but I think that's generally due to the lack of individual disks. Not actually thought about it before - will look into it. ( filecopies on a sql server sat on a VM can be very painful - but then sql on VM is pretty poor anyway in my experience )