How Restore Works In SQL Server

  • Hello,

    I gathered some information on How the restore works in sql server. From Gail's answers, Iam putting together all the scenarios.

    Please correct me If I misunderstood anything below.

    1.When we restore full backup from the location D:\Backup\ABC.bak, is the mdf file of ABC.mdf will be replaced with the newly restored ABC.bak file and creates the new mdf file?

    Yes, because we are restoring the Database from scratch and replacing the existing one

    2.When we restore Differential backup from the location D:\Backup\ABC.bak, is the mdf file of ABC.mdf will be replaced with the newly restored .bak file and creates the new mdf file again?

    No. Differential Backup contains changes and those changes will be applied directly to the appropriate data pages

    3.When we restore Log backup from the location D:\Backup\ABC.trn, is the ldf file of ABC.ldf will be replaced with the newly restored .trn file and creates the new ldf file?

    No. The log records contained in the backup will be replayed against the database

    4.When we restore log backup from the location D:\Backup\ABC.trn, is the ldf file of ABC.ldf will be replaced with the newly restored .trn file and creates the new ldf file? Or appends to the previous ldf file?

    Neither. The log records contained in the backup will be replayed against the database

    Thanks

  • This seems correct according to my understanding.

Viewing 2 posts - 1 through 1 (of 1 total)

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