July 30, 2007 at 8:43 am
Hello,
I need to move a 30gb database log file from one drive to another as it is created on a wrong drive.i used the detach attach method.but when i try to copy[ or cut] the file from its present location to the right drive after i detach the databse ..the file starts copying but after a few minutes i get an error "insufficient system resources exist to complete the tasks'.I chcked all the services and there are not many services running and it does not seem like that the box is busy.
Could anyone let me know any soultion for this problem.
thanks
July 30, 2007 at 9:40 am
When you say from one drive to another, are both of these drives on the same machine? How many connections have to be made between the two drives? What method are you using to copy the file? it's possible your system is trying to read the entire file into memory, and is choking because there's not 30 gb of memory available.
July 30, 2007 at 10:33 am
Yes both the drives are on the same machine ..moving from J: to T: on the same machine.
I just right click and say copy and try to paste the file in the new location.
So what do you suggest?
Thanks
July 30, 2007 at 10:52 am
A 30 Gig log file is huge ! Why don't you shrink the log file first.
July 31, 2007 at 2:55 am
I use robocopy (part of the Windows NT and 2000 resource kits) when copying large files, it supports restarts, network interruptions and you can pipe progress to a text file. Robo stands for Robust.
ll
July 31, 2007 at 6:37 am
Is the target file system also NTFS ? Fat has a 3 GB limit..
regards
Wim
Wim van den Brink
July 31, 2007 at 7:14 am
Another option is to do a full backup of the database. Remove the database from the system and do a restore from your backup to the correct drives.
You may not even need to move the database backup file from its current location.
July 31, 2007 at 7:23 am
I have two possible solutions for you:
You can backup the database and restore it using the WITH MOVE <logical log name> TO <os file name>. This will allow you to specify the new location for the log file. For more info check out this BOL article:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/4bfe5734-3003-4165-afd4-b1131ea26e2b.htm
Alternatively, you can create a second log file in the proper location, then issue DBCC SHRINKFILE (old_log_file_logical_name, EMPTYFILE). This will move the existing logfile to the new one (or distribute it to other logfiles if there are several). Just make sure there's diskspace available and the new log file can grow to the required size. For more details, check this BOL article:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/e02b2318-bee9-4d84-a61f-2fddcf268c9f.htm
Hope this helps!
Carter
But boss, why must the urgent always take precedence over the important?
July 31, 2007 at 8:23 am
I have had similiar issues with drives that have bad sectors. Is the disk new? How was it formatted (RAID controller, OS ...)? Have you tried to reformat the disk? Have you checked your cables to ensure they are tight? From my experience copying big files and getting the insufficient resources error is caused by a hardware problem. Good luck!
July 31, 2007 at 1:32 pm
xcopy still works well. And I have to agree with one of the other posts. You are not shinking the file before copy why?
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply