none
Restore database question

    Discussione generale

  • I have a question about restoring database in Full recovery model.

    I am not sure why tail log is needed when for example I have full data backup only.
    If I want only full database  restore and recover in that data , and not beyond that backup, then why tail log is required?
    My understanding is that in full data backup exists enough log records so that database can be recovered.

    In general, I don't understand why tail log is needed if I for example don't want to recover to the point of failure.
    If I use option WITH REPLACE, then tail log is not required.
    What is the difference between REPLACE and no REPLACE? I thought that anyway data and log is been overwriten in restore process, or is it? How exactly restore process goes?

    domenica 19 luglio 2009 10:23

Tutte le risposte

  • Here is my take on this.

    >>
    I am not sure why tail log is needed when for example I have full data backup only.
    If I want only full database  restore and recover in that data , and not beyond that backup, then why tail log is required?
    My understanding is that in full data backup exists enough log records so that database can be recovered.
    <<

    Tail log backup is an important part if you are planning to do point-in-time restore, minimizing the data loss and keeping the log chain intact. Yes, you can restore the database without a tail log backup only upto the point in time contained in the last log backup. There is still a chance that you might be loosing some transactions that are in transit in the full backup.If you do a tail log backup and if the transactions are committed, you can recover them and keep the log chain intact.

    >>
    What is the difference between REPLACE and no REPLACE?
    <<
    REPLACE is just a safety step not to shoot your foot. If you are restoring on a server and by mistake you have a same name database already then SQL Server will complain that the name already exists. If you specify REPLACE, then you are telling SQL Server that its ok to over write the existing database name. Just use extra caution while using this option. 

    Paul Randal wrote some excellent articles on backups, transaction logs and recovery and its very good material.








    | Sankar Reddy | http://sankarreddy.spaces.live.com/ |
    domenica 19 luglio 2009 20:08