Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Attaching Database 1

Status
Not open for further replies.

Flybridge

MIS
Jul 7, 2003
130
GB
I have used the detach/attach facilties to enable me to move a database to a different volume on the same server. However, I get an error message.

'Error 9004: an error occurred while processing the log for database {databasename}'

This may be linked to a previous error message when copying the MDF and LDF files. It said it was unable to copy the file because it was too deep (presumably it meant the path?). But when I checked both locations, the file in the target location claimed to be the same size as the source file. I haven't seen this error message before when copying files, but presumably it has caused the error 9004 above.

Does anyone have any idea what the problem is and how to solve it?

Thanks in advance.




'The world isn't round - it's bent!' Spike Milligan
 
Sounds like the log file got corupt while being copied.

Try to recopy it.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I've tried copying it again, and copying it to different locations -
because the error message said the path was too deep I copied it just to the root of the current volume and still got an error message after the copy and it wouldn't attach in EM.


'The world isn't round - it's bent!' Spike Milligan
 
Try doing the copy in dos.

How many characters are there in the folder path and file name?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
44 including the file extension


'The world isn't round - it's bent!' Spike Milligan
 
How large is the file?

-SQLBill

Posting advice: FAQ481-4875
 
You shouldn't be getting any file length problems with 44 characters.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I'm wondering if the file itself was too large to send over the network and got corrupted.

-SQLBill

Posting advice: FAQ481-4875
 
It could be that it got scrambled during transmittion. I've moved some very large mdf and ldf files accross the network before (100+ Gigs) with no problems.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Hi guys

Thanks for the comments. I'm off site most of the week, as I am now. From memory, the biggest file is 20Gb, so from what you have said that shouldn't be a problem.

But every time I try to move a file I get the message, so it is happening on every occassion. And I'm not even going across the network - just to a different volume on the same server, from non-raided to raided.


'The world isn't round - it's bent!' Spike Milligan
 
How are you doing the file move?

What if you do the move from a remote machine?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I'm using mapped drives from my laptop to copy/move the files across (or trying to!).

Do you think I need to go to the machine room and do it on the console?


'The world isn't round - it's bent!' Spike Milligan
 
From the console might help. Try doing it without the mapped drives. They can cause all sorts of funky issues.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Thanks for the input. When I work from the console they copy fine and the detach/attach database routine works.

Have a star.


'The world isn't round - it's bent!' Spike Milligan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top