Re: Crash Recovery
From: Sylvain Lafontaine ("Sylvain)
Date: 03/10/04
- Next message: Tore G: "RE: Multiple Input Parameters"
- Previous message: MGFoster: "Re: Calling a DTS Package"
- In reply to: Bob Morris: "Re: Crash Recovery"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 10 Mar 2004 02:36:30 -0500
In theory, if the logfile closely follow the backup of DATA.BAK, then you
can make a backup of the log file, then restore the database with norecovery
and finish with the restoration of the log file with recovery. Something
like, with DATA being the name of the database:
use master
go
sp_addumpdevice 'disk', 'log_dump_emergency', 'c:\tmp\log_dum_emergency.dmp'
go
backup log DATA to log_dump_emergency with no_truncate, init
go
restore database DATA from full_backup with replace, norecovery
go
restore log DATA from log_dump_emergency with recovery
go
use DATA
go
select count (*) from MyTable .........
But if there are a missing logfile beetween the time DATA.BAK has been taken
and the beginning of the transactions inside the log file, then you can't
use the procedure above and recover your database with a restore.
However, in the latter case, the use of a tool like Lumigent LogExplorer can
probably help you recover your database. There are others tools for
exploring a log file, you can make a search on the internet.
S. L.
"Bob Morris" <bmorris@kenyaonline.com> wrote in message
news:u1CcEsfBEHA.3404@TK2MSFTNGP10.phx.gbl...
> Very clever. Now does anyone know how to apply the LDF after restoring the
> database from the backup? That is what I am asking.
>
> "Lyle Fairfield" <MissingAddress@Invalid.Com> wrote in message
> news:Xns94A759EF43612FFDBA@130.133.1.4...
> > Lyle Fairfield <MissingAddress@Invalid.Com> wrote in
> > news:Xns94A75503EEE86FFDBA@130.133.1.4:
> >
> > > "Bob Morris" <bmorris@kenyaonline.com> wrote in
> > > news:e5TMyocBEHA.580@TK2MSFTNGP11.phx.gbl:
> > >
> > >> I am trying to restore a crashed server. The server has an SQL2K
> > >> installation with a small database (say) DATA. The file DATA.MDF has
> > >> gone missing during the crash. The file DATA.LDF has been recovered.
> > >> There is also a backup file DATA.BAK. This backup is about 4 MB and I
> > >> suspect it was used to install the database in the first place, as it
> > >> is several months old. The log file LDF has been recently updated and
> > >> is 47 Mb.
> > >
> > > Fire the database administrator. Fire the person responsible for
hiring
> > > and supervising the database administrator. Fire the person
responsible
> > > for hiring and supervising the person responsible for hiring and
> > > supervising the database administrator. Keep going up the hierarchical
> > > chain until you have reached the top.
> > > Then hire a minimally responsible and intelligent professional to
> > > administer your database. He or she can assess the potential for data
> > > recovery.
> >
> > BTW
> >
> > If you restore the database from the last backup, and then restore the
log
> > with recovery you MAY have your database. But I think you need a
> > professional SQL administrator to guide you through this.
> >
> >
> > --
> > Lyle
> > (for e-mail refer to http://ffdba.com/contacts.htm)
>
>
- Next message: Tore G: "RE: Multiple Input Parameters"
- Previous message: MGFoster: "Re: Calling a DTS Package"
- In reply to: Bob Morris: "Re: Crash Recovery"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|