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

Attaching database without log files (2)

Status
Not open for further replies.

juanfd

IS-IT--Management
Jan 21, 2004
45
Hi, I have a 700Mb database that I detached but for some reason I lost the two log files that it had (deleted, I guess though I have no idea when...).

No I am trying to reattach it and have tried all the techniques that I have found in google without luck.

The ost I can do is run dbcc rebuildlog and it show me an error that says that the LSN numero passed to the log engine is not valid, connection lost. After that I rerun dbcc and I get a 504kb log file, so I tried to continue the process but in the end I get a message that says:

Error 5123: CREATE FILE encountered operating system error 32(The Process cannot access the file because it is being used by another process.) while attempting to open or create the physical file 'c:\.....'

Or something like that and the attach process ends without any results...

What can I do? please I am in great urge for a solution to this...

THANKS IN ADVANCE
 
You might have to restore from your backup.

Have you tried to search the drives for the 'missing' log files? Just search for *.ldf and see if any are your missing files.

-SQLBill

Posting advice: FAQ481-4875
 
If not reattach the mdf file and ldf file will get created by itself.

Dr.Sql
Good Luck.
 
DrSql,

I would have suggested the same, but the poster said:
I am trying to reattach it and have tried all the techniques that I have found in google without luck.

Attaching a single file should have been one of the techniques, it's pretty common solution to this issue.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top