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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reattaching DB problems with two log files

Status
Not open for further replies.

sopham123

MIS
Jun 3, 2003
10
US
We detached a db in sql2000 copied it to another server. Original server was erased and sent back to manufacturer (Lease). We forgot to copy a second transaction log that resided on a different drive. We have tried to re attach the db but keep getting cant find log x error message. We have tried reattaching just the database files with the sp_attach_single_file_db. but nothing. We tried renameing files, creating new db in enterprise mngr then dleleting new mdf, ldf and renaming old files to restore. that did not work. Is there something in the ldf files that ties it to a computername? If so can this be edited?
 
OK ... let see if we can just get the DB attached and in Suspect Mode. I know you have tried the "Create DB" then "Drop DB" then "Rename Original Files" but lets try a different method.

First off ... If possible, copy your current MDF and LDF to another folder/server for safe keeping.

Go ahead and rename the orginal MDF and LDF to someting different.

Create a new DB w/ the same name.

Stop SQL Server

DELETE the newly created MDF and LDF

Rename ONLY the original MDF NOT the LDF to the true DB name

Restart SQL Server

Is the DB now attached and in Suspect Mode?

Thanks

J. Kusch
 
Let me add something to the mix there are infact 6 mdf files. It is a complex database. Will you method still work?
 
Hmmm ... I beleive you can only have 1 MDF and the multiple NDFs per database.

Thanks

J. Kusch
 
Ok what do I do when the db is in suspect mode to get it back to normal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top