Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Recovery Help Expand / Collapse
Author
Message
Posted Tuesday, March 24, 2009 7:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 24, 2009 7:31 PM
Points: 7, Visits: 23
Gonna repost this here...accidentally stuck it in the 7 & 2000 forums

Here is the situation

MS SQL Server 2005 Express

3/20/09 Database is created by restoring from a Full Backup from a different database
3/20/09 Differential backup is taken by a daily scheduled task
3/21/09 Database accidentally deleted by internal process

need to restore database

what i have:

Full backup (from a different database) used to create db on 3/20/09

A differential backup of deleted database taken on 3/20/09

Corrupted mdf recovered by file recovery tool. (i.e. Attach yields not a primary database file and sp_attach_single_file yields invalid header. PageAudit incorrect etc.)

ldf may or may not be corrupted

Is all hope lost, or do I have something to work with.
Post #682356
Posted Tuesday, March 24, 2009 8:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 24, 2009 7:31 PM
Points: 7, Visits: 23
Additional details:

I have three databases in this condition and some are at least a weeks worth of differential, no full backups, except the one from which it was created (which is from another database)

Basically here is what happens:

1) An internal application restores a copy of the same database to a new database every time a new "instance" is required
2) The new "instance" of the database now functions independently, it gets its own full (weren't running for some reason) and diff backups
3) When an "instance" is no longer needed it is flagged, and then removed (dropped) by the same internal application which created it.

Unfortunately, these three databases were incorrectly flagged and removed.

File recovery got the mdf's and ldf's back, they are the correct sizes even. But when we attempt to attach them we get "not a primary database file" and and single file attach "invalid header... PageAduit...incorrect", etc.

We have only the full from the database from which these instances were created and diff backups since they were created.
Post #682358
Posted Tuesday, March 24, 2009 8:12 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 10:36 AM
Points: 31,362, Visits: 15,823
Have you tried restoring the original db (from the .bak) and then restoring a diff?






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #682376
Posted Tuesday, March 24, 2009 9:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 24, 2009 7:31 PM
Points: 7, Visits: 23
I get this message:

The volume on device 'C:\PathToFullBackup\FullbackFile.bak' is not part of a multiple family media set. BACKUP WITH FORMAT can used to form a new media set. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3529)

The full back up is associated with the "master copy" that we create these individual instances from, not with the database I am attempting to restore.

I know between the full back up of the other database and the diffs of this database, all the data is there. Just no way to use it!
Post #682473
Posted Tuesday, March 24, 2009 9:23 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:13 AM
Points: 40,609, Visits: 37,070
angels4kali (3/24/2009)
I get this message:

The volume on device 'C:\PathToFullBackup\FullbackFile.bak' is not part of a multiple family media set. BACKUP WITH FORMAT can used to form a new media set. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3529)


What was the restore command that you used there/



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #682483
Posted Tuesday, March 24, 2009 9:33 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 10:36 AM
Points: 31,362, Visits: 15,823
That message is usually when you have striped the backup to multiple files.

Do you have the backup command, and the restore command?







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #682494
Posted Tuesday, March 24, 2009 10:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 24, 2009 7:31 PM
Points: 7, Visits: 23
MasterCopy
- Full back up of MasterCopy: MasterCopyFull.bak

InstanceA
- Differential backup of InstanceA: InstanceADiff.bak

Right clicking on restore database...
Restore from device and selecting the two above back ups
Post #682537
Posted Tuesday, March 24, 2009 10:20 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:13 AM
Points: 40,609, Visits: 37,070
angels4kali (3/24/2009)
Restore from device and selecting the two above back ups


By doing that you're telling SQL that is is one backup striped across two files, which it is not.

Select restore, select just the full backup and make sure you find the option to leave the database in recovery (on the second tab of the restore backup screen)

Once that restore has completed, then go and restore again, this time selecting the diff backup. You can set the option to recover the DB and make it available on this won.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #682550
Posted Tuesday, March 24, 2009 12:36 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 24, 2009 7:31 PM
Points: 7, Visits: 23
Got one out of three back doing this, this one was created earlier this week

The other two think they had a backup on 3/15, although the backup file doesn't exist

For that matter, all my databases, including those that weren't dropped think they had a full backup taken on 3/15 and none of the full backup files exist

Any idea what would cause this?
Post #682700
Posted Tuesday, March 24, 2009 2:08 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:13 AM
Points: 40,609, Visits: 37,070
angels4kali (3/24/2009)
For that matter, all my databases, including those that weren't dropped think they had a full backup taken on 3/15 and none of the full backup files exist

Any idea what would cause this?


A full backup that was taken (ad-hoc) and the backup file then deleted.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #682805
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse