How to restore a database using mdf and ldf files in Sql 2008
How to restore a database using mdf and ldf files in Sql 2008
Hello,
Asking for expert opinion. A very unfortunate event happened. One of our PCs crashed few days ago. That PC had SQL Server 2008 installed. Unfortunately no backup was running on that server. We sent the disk to a data recovery place and looks like they can recover some of the mdf and ldf files. We are particularly interested in 1 particular database. My questions are:
1. Is this possible to restore a particular database using corresponding mdf and ldf files?
2. Do we need to have any mdfs from the system databases? Any other files we need to ask data recovery company t look for?
3. Steps and/or or best practices to restore that database into a new machine.
Thanks for your help in advance.
This question has accepted answers - jump to:
Answers
1)
You can attach the database files to another instance if you have the mdf' and ldfs ( even with mdf you will be able to attach )
System database master contains the user info, and msdb contains the jobs and other info; if you couldn't recover these files, you need to add them manually
ssms -> rightclick database -> attach ; choose the files and attach
OR
You may have to run a 'DBCC CHECKDB()' statement against the newly attached database
2)
You can copy the .mdf and .ldf files to a different server and just Attach them.
https://msdn.microsoft.com/en-us/library/ms190209.aspx
You will lose any server-wide logins created at the instance level but you will retain your database users.
3)
If the database is not open, then I think the files could be damaged. see this support article from microsoft. https://support.microsoft.com/en-us/kb/288809
If this does not help, then only have the option to try third-party program. Can in the Market to look for or can use like SQL Server Recovery Toolbox. I as the expert recommend it to you. Or can use any other tool known to you. http://www.oemailrecovery.com/sql_repair.html
So I told you all the possible ways.)
I don't see how this is related to DataTables? Could you clarify why you posted this question in this forum?
Allan
Look at this resource, you might find more useful information. http://community.office365.com/en-us/f/172/t/266070.aspx
Thank you guys for your feedback and help. Sorry, that long time did not respond. This is because the issue was solved and I forgot to tell.) Thank you!
I still don't see why you posted this question in this forum? I would be very grateful if you could let me know so others looking for similar help in future might be directed to the correct place.