Crash Recovery

  • Thread starter Thread starter Bob Morris
  • Start date Start date
B

Bob Morris

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.

Is there any way to recover this database to a reasonable up to date version
using DATA.BAK and DATA.LDF. All suggestions are welcome?

Bob
 
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.
 
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.
 
Very clever. Now does anyone know how to apply the LDF after restoring the
database from the backup? That is what I am asking.
 
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 said:
Very clever. Now does anyone know how to apply the LDF after restoring the
database from the backup? That is what I am asking.
 
Back
Top