Recover data from .mdf file
Dear All,
Hi. I have a server with the following installed:
Windows server 2008 R2 SP1
SQL Server 2008 R2
My production database was "mydb"
The production database files were stored as below :
1) "mydb.ndf" file was stored at "C:\Program Files\Microsoft SQL Server\
2) "mydb.mdf" and "mydb.ldf" files were stored at D:\myfolder
Due to some reasons the Hard disk crashed and I lost my C:\ drive leaving me with only the ".mdf" and ".ldf" database files.
I have re-installed the Windows server 2008 R2 SP1 and SQL Sever 2008 R2. Now when I try to "re-attach" "mydb", by following method :
Right click Databases-
I get the following error :
"Unable to open the physical file C:\Program Files\Microsoft SQL Server\
My Query :
How can I recover/restore the database from just .mdf and .ldf files ?
I've tried the following :
1) Creating a "mydb.ndf" file and saving at the same location but SQL server is not able to map it to "mydb.mdf".
2) Creating a new "mydb" and over-writing "mydb.mdf" and "mydb.ldf" to the newly created location.
Please advice a solution as this recovery is very crucial for me.
Question information
- Language:
- English Edit question
- Status:
- Invalid
- Assignee:
- No assignee Edit question
- Solved by:
- Geert JM Vanderkelen
- Solved:
- Last query:
- Last reply: