Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Recover data from corrupt mdf and ldf files


  • Please log in to reply

#1
harry90

harry90

    New Member

  • Member
  • Pip
  • 1 posts
I am running MS SQL Server 2000 SP4 on MS Windows 2000 SP4. The server was crashed due to some hardware problems. I was able to recover .mdf and .ldf files but when I tried to attach them an error message appears that. 
 
Error 5171: path......\.mdf is not a primary database file.
 
I have also tried to attach a single file using sp_attach_single_db Stored procedure but the output is
 
Server: Msg 5172, Level 16, State 15, Line 1
The header for file path......\.mdf is not a valid database file header. The PageAudit property is incorrect.
 
Then I created a new database with the same name
stop SQL Service
replace newer files with the corrupted one
Start SQL Service
Now the database is in the suspected mode
Changed it to emergency mode
executed dbcc checkdb ('dbname')
then dbcc dbrecover ('dbname')
 
but none of the attempt is fruitful. Would appreciate your help and quick response in solving the problem.
 
N.B. I have .mdf and .ldf files only.

  • 0

Advertisements


#2
paulhogan

paulhogan

    Member

  • Member
  • PipPip
  • 12 posts
Hello harry,
 
I think this source will be helpful for you: http://www.slideshar...y-database-file
 
Regards
Paul Hogan

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP