Restoring SQL Databases

1. Find the server that has the SQL database which needs restored. Expand the SQL Server agent under the server name to view all the SQL Instances. Bring up the “Browse and Restore” by right clicking SQL Instance name in the left column.

2. After clicking “Browse and Restore” you will be given a few different options for your Intended Restore type. Once your intended Restore Type and Time are selected, click “View Content”. (Please see the note below about selecting the restore time before continuing)

Before you proceed

Before clicking “View Content”, click on the “Time” tab. By default, the Latest Backup available will be used for the restore. However, if you would like to restore from a different date, select the “As of” option and select a date and time to restore from.

  • If using “As of”, the last backup from before the specific time provided will be used for the restore.

 

3. Please select the desired Restore Option to continue from the list below that was selected in step 2.

Restore in Place: Restores the Database to the original location and Instance. (This will overwrite the original Database!)

Restores the Database to the original location and Instance. (This will overwrite the original Database!)

  1. Select the SQL Database(s) that needs restored and then click “Recover All Selected…”.
  2. Since you selected to restore in place you will not be able to change any options on the “SQL Restore Options” page. Please verify that the SQL Server\Instance and Database(s) listed on this page are correct as this is what will be overwritten.

Click OK to start the restore once all settings are verified. (This will overwrite the original Database!)

Restore out of Place: Restores database using a different name, file path, or instance. (Restore to a new Database name or overwrite an existing Database on the original or different destination server with a Commvault SQL Agent installed.)

Restores database using a different name, file path, or instance. (Restore to a new Database name or overwrite an existing Database on the original or different destination server with a Commvault SQL Agent installed.)

  1. Select the SQL Database(s) that needs restored and then click “Recover All Selected…”.
  2. Once the SQL Restore Options come up, choose the Destination Server and SQL Instance at the top of the screen. Next, type the new Database Name(s) and File Paths for the restored Database and Log files. Make sure to change the Database names and files paths to something unique that isn’t currently in SQL on the destination server.
    • To overwrite an existing Database(s) on the destination server, change the name for the restored database in the Database column to match the exact name of the database you want to overwrite. Also make sure to match the Database Files for the Database(s) that will be overwritten so that the old .MDF and .LDF files are overwritten as well.
    • Database files are .MDF and log files are .LDF. You can also see how much free space will be required on the drive to restore each file under the Size column.

Click OK to start the restore once all settings are verified.

Restore to Disk: Restore database to disk. (Restore the Database to disk as a .BAK file to the original or different destination server with a Commvault SQL Agent installed.)

Restore database to disk. (Restore the Database to disk as a .BAK file to the original or different destination server with a Commvault SQL Agent installed.)

  1. Select the SQL Database(s) that needs restored and then click “Recover All Selected…”.
  2. Once the SQL Restore Options come up, choose the Destination Server at the top of the screen. Next, click the “Browse” and select the destination path to restore the BAK file too.
    Notes:
    • You must rename the databases before restoring them to a disk, either on the same SQL server or a different SQL Server.
    • For each backup type, one file is created per stream. The naming convention of the file is <DB_name>_<Stream#>_<BackupType>_<DayofWeek, Month, Day, Time, Year>.bak, where date and time are the date and time of the database backup.

Click OK to start the restore once all settings are verified.

Instance Recovery: Recover the original Instance. (This will overwrite the entire original SQL Instance!)

Recover the original Instance. (This will overwrite the entire original SQL Instance!)

  1. Since you selected to restore the entire SQL Instance, all Databases will automatically be selected for restore. Please click “Recover All Selected…” to proceed to the next screen.
  2. Since you selected to restore the entire SQL Instance, you will not be able to change any options on the “SQL Restore Options” page. Please verify that the SQL Server\Instance and Database(s) listed on this page are correct as this is what will be overwritten.

Click OK to start the restore once all settings are verified. (This will overwrite the entire original SQL Instance!)

Advanced Restore: Restore database with advanced capabilities. (Used to specify 'Recovery', 'Norecovery' or 'Stand By' Recovery Types)

Advanced Restore: Restore database with advanced capabilities. (Used to specify “Recovery”, “Norecovery” or “Stand By” Recovery Types)

Recovery Types and Undo Path

Specifies the type of recovery that must be performed. This is the state of the database after the restore.

  • Recovery

    Selecting this option to restore a database leaves the database in an online state.

  • Norecovery

    Selecting this option to restore a database leaves the database in a restoring state.

  • Stand By

    Selecting this option to restore a database leaves the database in a read-only state.

  • Undo File Path

    Displays the path in which the undo file is stored, when the Recovery Type is Stand By. Use the space to modify the default path.

    Once the restore is complete, the SQL Server Agent uses the data from the undo file and the transaction log to continue restoring the incomplete transactions. Therefore, once the restore completes, the undo file is re-written with any transactions that are incomplete at that point.

  • Browse

    Click to select a path for the Undo File Path.

Was this article helpful?

Related Articles