Summary of restoration methods for backup files in SQL server

Source: Internet
Author: User
Tags diff

If we use the command mode, it would be easy to restore.

The code is as follows: Copy code

Restore database [PoloSoft-Full] from disk = 'C:/Users/Administrator/Desktop/PoloSoft. Bak'
With replace;


Or you won't use the command mode. We can refer to the text below to restore it.

Create a database named TestBackup, create a table named Table1, this time for a complete backup, backup file: TestBackupDB-full.bak; then create table Table2 for differential backup, backup file is: testBackupDB-diff.bak; then create table Table3 and back up transaction logs (if the database sets recovery mode to simple, then the transaction log will not be visible in the backup type option), the backup file is: testBackupDB-log.bak;

Create a database named TestBackup2 to test the restoration of the backup file of the TestBackup database.


(Figure 1: create a database structure)


(Figure 2: backup type)

Below we can restore three backup files: TestBackupDB-full.bak, TestBackupDB-diff.bak, TestBackupDB-log.bak:

       Step 1:Restore the full backup file TestBackupDB-full.bak, as shown in Figure 4 and Figure 5. After the restore is successful, the data list is shown in Figure 6 because of the recovery status options:Do not perform any operations on the database, and do not roll back uncommitted transactions. Other transaction logs can be restored. (Restore with norecovery)


(Figure 3: Go to SSMS to restore)


(Figure 4: conventional restoration)


(Figure 5: restore options)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.