Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an old server running Windows Server 2003 R2. Windows got corrupted due to an improper shutdown. I attempted to repair the Windows installation, but it made things worse (it gets to the desktop, but there is no start menu and most of the start menu items are missing). I cannot run any programs and Windows claims that the applications must be reinstalled.

Anyways, this server is old and we have a newer server that has taken over 90% of the duties of this server except for hosting a database. A backup of the database was used to get it started on the new server, but it is about one day old. Unfortunately, all the inventory data was entered between the last backup and when the server failed and that is a lot of information to re-enter.

Is there a way to retrieve the database information straight from the hard disk (by plugging it into another computer to read from)? The database was being managed by MS SQL Server 2008. I've use a third party SQL backup tool and MS SQL Server Management on the machine itself and it won't load the application (complains about missing core Windows and .Net files). Re-running the windows setup has been useless resulting in the same gimped desktop.

share|improve this question
1  
Good lesson in taking log backups every 5 minutes, or use log file shipping automatically every 15. You lost a day of work for not taking care of your data - bite it, reenter the data and if necessary hire a pro to set up a proper replication topology. –  TomTom Jan 4 '13 at 18:33

2 Answers 2

up vote 1 down vote accepted

I would try to copy the database file(s) off that hard drive onto another computer running MS SQL 2008 and see if the file is accessible. It sounds like some Windows files are corrupted but that doesn't mean your database file is. This information might be helpful:

http://stackoverflow.com/questions/6584938/move-sql-server-2008-database-files-to-a-new-folder-location

share|improve this answer

If you can get the .MDF and .LDF files for the old database off of the old hard drive intact, you should be able to attach them as a new database on the new server. Reference here:

http://msdn.microsoft.com/en-us/library/ms187858.aspx

Let's say your database was named "MyDatabase" and that the files are "MyDatabase_Data.mdf" and "MyDatabase_Log.ldf"

Copy them to a folder on your new server, say "c:\MySQLServer" and then attach them as a new database:

USE master;
GO
CREATE DATABASE MyDatabase 
    ON (FILENAME = 'C:\MySQLServer\MyDatabase_Data.mdf'),
    (FILENAME = 'C:\MySQLServer\MyDatabase_Log.ldf')
    FOR ATTACH;
GO
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.