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.
Author |
Topic |
jRomeo
Starting Member
3 Posts |
Posted - 2008-11-21 : 02:10:07
|
Hi:I have a database created in SQL Server 2005 Express Edition. As fate would have it the drive on which the mdf and ldf files of that database reside became corrupted last week. In fact, I had to replace the entire PC. I recovered the data from the bad hard drive. Trouble is, when I try to attach it to the new installation of SS2K5 EE, I receive an error that the mdf file is "not a primary database." Am i skee-rood, or is there hope? How can I recover this DB? Here's a link to the error message. http://www.southtechinc.com/db_error.jpgThanks in advance.jRomeo |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-21 : 02:44:54
|
Seems the database header is corrupt. E 12°55'05.63"N 56°04'39.26" |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-11-21 : 05:18:45
|
moved to proper forum._______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! |
|
|
jRomeo
Starting Member
3 Posts |
Posted - 2008-11-21 : 12:19:50
|
quote: Originally posted by Peso Seems the database header is corrupt. E 12°55'05.63"N 56°04'39.26"
Is there a way to recover the db? |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2008-11-21 : 16:55:30
|
Do you have a good backup that can be restored?Terry |
|
|
jRomeo
Starting Member
3 Posts |
Posted - 2008-11-21 : 19:13:05
|
quote: Originally posted by tosscrosby Do you have a good backup that can be restored?Terry
The error I received above came from the backup copy. |
|
|
paulrandal
Yak with Vast SQL Skills
899 Posts |
Posted - 2008-11-22 : 17:14:54
|
In your own words, yes, you're 'skee-rood'. There's no way to salvage that database as the primary data file is corrupt. Even doing the attach-a-suspect-database trick won't work as the database simply won't start up.Paul S. Randal, SQL Server MVPAuthor of SQL 2005 DBCC CHECKDB/repair codeAuthor & Instructor of Microsoft Certified Master - Database courseManaging Director, SQLskills.com (www.SQLskills.com/blogs/paul) |
|
|
|
|
|