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.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 can't attach

Author  Topic 

b5white
Starting Member

18 Posts

Posted - 2011-01-20 : 12:18:36
> -- Recover a corrupt database
>
> The first step is to attach the database as suspect
> Create a database with an mdf of the same size as the old one
> stop the server.
> Copy the corrupt mdf over the newly created one.
> Restart the server - the database should be suspect.
> Author Nigel Rivett
> http://www.nigelrivett.net/SQLAdmin/RecoverCorruptDatabase.html

Fascinating. Perhaps these other backups are not
worthless just because they can't attach.
I'll try one of the more recent and see if we can recover
any of the recent data. We could perhaps add that to the
month old data that we do have a good backup for.

Brad.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-20 : 12:40:48
Your post seems a bit out of place. Were you trying to reply to an existing thread instead?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

b5white
Starting Member

18 Posts

Posted - 2011-01-20 : 12:54:52
> Your post seems a bit out of place. Were you trying to reply to an existing thread instead?

No. This valuable tidbit was buried in another thread.
It is clearly related to my other recent post but seems
to me to need a separate thread.

I reposted it so that people with Can'tAttach problems might
have a chance of finding it.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-20 : 12:55:27
That is ONLY for the case where someone detached a suspect database and found it won't reattach.

You don't attach backups. You restore them (RESTORE DATABASE FROM DISK)

--
Gail Shaw
SQL Server MVP
Go to Top of Page

b5white
Starting Member

18 Posts

Posted - 2011-01-20 : 15:04:55
I may be using the term "backup" loosely. They have an MDF extension.

Brad.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-20 : 15:32:03
WT$%^%?

You DO NOT back a SQL database up by copying the mdf file. That's the absolute best way to have a damaged and unusable 'backup'. You back a database using BACKUP DATABASE. That way you have a consistent and usable backup to restore.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -