Discussion Locked

SQL ver 7 .mdf file...

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
HOw is it to restore a database(or make it life) if you only got the .primary data file(.mdf) and translog file

5 replies

by steved

The following has worked for me:

1) Use Enterprise Manager to create a new database of the same name as the one you're trying to restore. It will create files with the same names as the .mdf and the .ldf that you have.

2) Delete the newly created .mdf and .ldf files.

3) Copy your old .mdf and .ldf into the data directory.

I hope it works for you too!

Steve Diamond

by clwclark

From the command prompt.
c:\osql -E
1>use master (enter)
2>go (enter)
1>sp_attach_db 'mydb','c:\mssql7\data\mydb.mdf','c:\msslq7\data\mydb.ldf'
2>go

This will work, promise.

This discussion is closed to new replies.