Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 attaching a deleted log file to suspected db

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-21 : 10:33:38
Tomasz writes "Hello,
Here is the situation:

There is a db on mssql 7.0 sp3.
Db has 1 mdf file and 2 ldf files.
There was backup done with option 'transaction log' selected.
No backup of complete database was done.
Log files were deleted from device (recovery is not possible).

If there is any hope for making this database functional, please let me know about it.

(i've already searched books online, faq and few sites. Major problem is still recovering the original log files to the form which enables me to attach them to the db)

(please forgive me my english)

Thank you very much in advance for your time and patience
Regards

Tomasz Jablonski
Poland"

solart
Posting Yak Master

148 Posts

Posted - 2002-08-21 : 12:56:22
Don't know that the following will work, but can decide if you want to try it.

Shutdown SQL Server.
Make a copy of the database .mdf file (like mycopy.mdf).
Startup SQL Server.
Use sp_attach_single_file_db providing a new database name (like mycopy using the copied database file "mycopy.mdf").
If this works it will also create a log file.
You then could delete/drop the original database.
You then could rename "mycopy" back to your original database name using sp_renamedb.

Best wishes solart
Go to Top of Page
   

- Advertisement -