Ask a questionAsk a question
 

AnswerHow get .ldf if .mdf broken ?

  • Wednesday, October 28, 2009 11:13 PM90350 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Dbase crashed between two scheduled Tlog backups:
    Full Backup -done
    Diffrential backup - done
    TLog backup - 4 subsequential done.

    Crash happened between 4th and 5th TLog backups. How we can restore Dbase? 
    Thanks.

Answers

  • Thursday, October 29, 2009 1:46 AMLekss Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I guess you are unsafe here , If you dont have tran log backups between 4 and 5th schedule  , you can only recover the database until that point (4th transaction log)
    Thanks, Leks

All Replies

  • Thursday, October 29, 2009 12:42 AMLekss Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    1. Do restore with full backup - NO RECOVERY
    2. Restore the differential backup with overwrite existing option - NO RECOVERY
    3. Restore the first tran log backup - NO RECOVERY
    4. Restore the second tran log backup - NO RECOVERY
    5. Restore the third tran log backup - NO RECOVERY
    6. Restore the fourth tran log backup - RECOVERY MODE
    Thanks, Leks
  • Thursday, October 29, 2009 1:05 AM90350 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks Leks.

    However we still need data after 4th backup.

    How we can get / backup .ldf between 4th and 5th backups?

    Thanks.
  • Thursday, October 29, 2009 1:46 AMLekss Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I guess you are unsafe here , If you dont have tran log backups between 4 and 5th schedule  , you can only recover the database until that point (4th transaction log)
    Thanks, Leks
  • Thursday, October 29, 2009 3:30 AMNimit Parikh Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try to take the Tail-Log Backup. If you are unable to take tail log backup then :(

    Like any log backup, a tail-log backup is taken by using the BACKUP LOG statement. We recommend that you take a tail-log backup in the following situations:

    • If the database is online, before starting a restore sequence, back up the tail of the log using WITH NORECOVERY whenever the next action you plan to perform on the database is a restore operation: 
      BACKUP LOG database_name TO <backup_device> WITH NORECOVERY
      ms179314.note(en-us,SQL.100).gifNote:
      To avoid an error, the NORECOVERY option is necessary.

       

       

    • If the database is offline and does not start.
      Try to take a tail-log backup. Because no transactions can occur at this time, using WITH NORECOVERY is optional. If the database is damaged, use either WITH CONTINUE_AFTER_ERROR or WITH NO_TRUNCATE. 
      BACKUP LOG database_name TO <backup_device> [WITH { CONTINUE_AFTER_ERROR | NO_TRUNCATE }
      ms179314.note(en-us,SQL.100).gifImportant:
      We recommend that you avoid using NO_TRUNCATE, except when the database is damaged.

       

       

      If the database is damaged, for example, if the database does not start, a tail-log backup succeeds only if the log files are undamaged, the database is in a state that supports tail-log backups, and the database does not contain any bulk-logged changes. 
  • Thursday, October 29, 2009 4:55 AMSNIVAS Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello 90350

    I guess Leks answered your question ...and Nimit Parikh given some more stuff...



    --> Crash happened between 4th and 5th TLog backups. How we can restore Dbase? 
    Explain little bit more about Crash... OS Crash...SQL Server Crash....or  DB Crash
    then you get more details.







    SNIVAS
    • Marked As Answer by90350 Tuesday, November 03, 2009 5:39 PM
    • Unmarked As Answer by90350 Tuesday, November 03, 2009 5:40 PM
    •