In Sql Server Can we recover new log file(.ldf) if we added that after full backup

  • hi ,

    i need help regarding one question In Sql Server.

    If i take full backup daily,ransaction log backup hourly.

    If suppose:

    I have taken full backup at 11am

    then added new log file(.ldf)

    and hourly backup running as usual.

    if db crashses then how we recover backup and log file with proper reason Please.

    Please do the needful.

    regards,

    Shikha Srivstava

  • Not sure i understand.

    You would need to restore your last full backup (.bak), then re-apply (restore) each log backup (.trn) up until the failure.

    If you dont have a log backup from after you added the new ldf file, its gone.

    HTH

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • One question first. Why would you be adding another log file?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • Hi,

    There is a need to do the same.

    Is this possible to recover the .ldf file in any case.

    Regards,

    Shikha

  • I would think that the steps of adding a new file (ALTER DATABASE) are captured in the transaction logs and would occur when you restore the transaction logs after first restoring the full ..... I've never tried it though.

  • I may have misunderstood but...

    As stated, as long as you have the full back up and relevant transaction log backup files then I dont think there is any reason why you cant reapply these to go bring the database to the state prior to the point of failure.

    'Only he who wanders finds new paths'

  • shikha.in.2 (1/11/2011)


    if db crashses then how we recover backup and log file with proper reason Please.

    I don;t understand what are you trying to say by this statement..

    /* How we recover backup and log file */

    Sorry we don;t recover backup and log files..

    But yes with your given scenario if i understood it well we can recover your database with no data loss because you did n't metioned any timelines for recovery.

    Any Change you make in the database is considered as a transaction and hence it is written in you active transaction log file. So as you mentioned if your log backup are running normally then you can most definitely recovery your database and also all data files and log files will be there...

    Going forward pls make sure that you are mentioning your problem more clearily.

    I hope the reply will help you..

  • Hi,

    I got my ans and i am going to implement this.

    If I get any issue then let you know.

    T & R,

    Shikha

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply