sql log restore

  • hi,

    need a quick help....

    I want to check when exactly some of the data is deleted from the database(table).

    We have full backup everyday and then log backup every 15 min.

    I have restored the perticular day fullbackup and then log to check if the record was exist at that perticular time or not with norecovery and recovery option.

    My database is operational mode now.

    But now I want to restore more log as the records still exists till my last restoration.

    So do i need to restore the whole sequence again or can i continue to restore the log.

    When I am trying to restore any more log with norecovery/recovery option, I am getting error as :-

    The log or differential backup cannot be restored because no files are ready to rollforward.

    ----------
    Ashish

  • If you restored the database WITH RECOVERY (bringing it online) then to restore more log files you need to restore from scratch the full backup and all logs.

    Once the database has been recovered no more logs can be restored.

    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
  • thanks Gail.

    Yes, now I am going to take the backup of till now restored database and then will restore it with no recovery and then further logs..

    ----------
    Ashish

  • Restore syntax: http://msdn.microsoft.com/en-us/library/ms186858%28v=SQL.100%29.aspx

    There isn't a good example there, but basically

    restore database xxxx from disk = 'yyyyy' with norecovery

    restore log xxxxx from disk = 'zzzzz' with norecovery

    restore log xxxxx from disk = 'zzzzz2' with norecovery

    ...

    When all logs are restore.

    restore database xxxx with recovery

  • thanks steve, I already did that. Actually I restored all logs and then last log with recovery assuming that might be this time the record get deleted. But I was wrong so need to do more log restore. Thats what my original question was.

    Anyway I found it as i posted recently. Now I am restoring with standby and it will allow me to restore log after checking the data from every individual log restoration.

    ----------
    Ashish

Viewing 5 posts - 1 through 4 (of 4 total)

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