Tuesday, March 20, 2012

Recover from a nuked database

One of our apps has accidently nuked one of our live databases and for
some reason our last backup was 1 month ago
It will have done a drop schema then re-created the schema and added 2
test records
Is there any way of rolling back the database to the point before the
drop + create ?
The MDF and LDF are still the same size which means the logs are
intact
Adam
What recovery model?
If simple, you are most probably toast.
If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
You could also check out some of the log reader tools and see if they can mine out of the
transaction log, but of course they are totally dependent on the log records being in the
transaction log.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Adam // Internetware" <internetware@.gmail.com> wrote in message
news:1184081055.300348.184120@.22g2000hsm.googlegro ups.com...
> One of our apps has accidently nuked one of our live databases and for
> some reason our last backup was 1 month ago
> It will have done a drop schema then re-created the schema and added 2
> test records
> Is there any way of rolling back the database to the point before the
> drop + create ?
> The MDF and LDF are still the same size which means the logs are
> intact
> Adam
>
|||On Jul 10, 4:31 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:[vbcol=seagreen]
> What recovery model?
> If simple, you are most probably toast.
> If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
> subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
> you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
> You could also check out some of the log reader tools and see if they can mine out of the
> transaction log, but of course they are totally dependent on the log records being in the
> transaction log.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Adam // Internetware" <internetw...@.gmail.com> wrote in messagenews:1184081055.300348.184120@.22g2000hsm.go oglegroups.com...
>
>
Looks like I'm Ok the Redgate log rescue seems to have picked up most
of the transaction log so I think I can rollback - give or take some
issues with FK's
Thx
Adam

No comments:

Post a Comment