Restore Data - Microsoft SQL Server - How To

Topics | How To | Full System Restore | Related Topics


Recovering a Database

Recovering All Configured Databases in a Single Instance

Apply SQL Server Transaction Logs (Step Restore)

Restore a SQL Server Database to a Point in Time

Restore a SQL Server Database to a Transaction Mark

Performing a Partial ("Piecemeal") Restore of a SQL Server Database

Restore Latest Backup Data (Warm Database Restore)

Skip Full Backup

Unconditionally Overwrite Existing Database or Files

Restore Destinations:

Back Up the Tail of the Transaction Log

Restore a Single Database Without Browsing

Restore SQL Server Files/File Groups

Restore a SQL Server Database with a Different Name (Move a Database)

Restore Multiple SQL Server Databases to a Consistent Time

Set the VDI Time-out Value for Large SQL Database Restores


Recovering a Database

Before You Begin:

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To RECOVER a database:

  1. From the CommCell Browser, right-click the database you want to recover, click All Tasks and then click Recover Only.
  2. Click OK to confirm that you want to Recover the database. The SQL iDataAgent recovers the selected database to an ONLINE status.

Recovering All Configured Databases in a Single Instance

Before You Begin:

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To RECOVER all configured non-system databases in a single instance:

  1. From the CommCell Browser, right-click the instance node, click All Tasks and then click Recover SQL Server.
  2. Click OK to confirm that you want to Recover all non-system databases. The SQL iDataAgent recovers the SQL Server to an ONLINE status.

Apply SQL Server Transaction Logs (Step Restore)

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To perform a Step Restore on a database:

  1. Begin any SQL Server restore procedure.
  2. When you reach the SQL Restore (General) dialog box:
    1. Select the desired Destination Server.
    2. Select Database Restore as the Restore Type.
    3. Select the Full backup from the Restore Time.
    4. Select NORECOVERY or STANDBY as the Recovery Type.
    The Step Restore option is only available when the database is already in a NORECOVERY or STANDBY state and an additional log is available for restore.
  3. When restoring encrypted data, refer to Data Encryption.
  4. Click OK to start the database restore.
  5. When the database restore is completed, repeat Step 1 in order to return to the SQL Restore (General) dialog box.
    1. Select the desired Destination Server.
    2. Select Step Restore as the Restore Type
    3. Select the desired LOG backup from the Restore Time.
    4. Select NORECOVERY or STANDBY as the Recovery Type
  6. Start the restore. The SQL Server iDataAgent applies the next log in the sequence.
  7. To apply additional transaction logs, repeat steps 5 and 6 as needed.
  8. When you are applying the last transaction log, select RECOVER as the Recovery Type. This returns the database to a recovered state.
    If you have already applied the last transaction log and the database is in NORECOVERY or STANDBY mode, and you want to return the database to a ready state, you can manually recover the database.

Restore a SQL Server Database to a Point in Time

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore to a point in time:

  1. Begin any restore procedure.
  2. When you reach the SQL Restore (General) dialog box, select Point in Time and select a Restore Time.
  3. Continue your restore.

NOTES


Restore a SQL Server Database to a Transaction Mark

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To perform a transaction mark restore job:

  1. Begin any restore procedure. For file/file group restore jobs, you must perform a complete restore of all database files in order to restore to a Transaction Mark.
  2. When you reach the SQL Restore (General) dialog box, select Transaction Marks and select a marked transaction from the list.  When multiple databases are being restored, the list of transaction marks includes only those marks that are common in name and timestamp to all the selected databases within the selected backup cycle.
  3. Select Stop at Mark or Stop Before Mark.
  4. Continue your restore.

NOTES

After performing a transaction mark restore job, the next backup job for that database is automatically converted to a full backup. 


Performing Partial ("Piecemeal) Restore of a SQL Server Database

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore to a point in time:

  1. Begin any restore procedure.
  2. When you reach the SQL Restore (General) dialog box, select Partial Restore.
  3. Continue your restore.

NOTES


Restore Latest Backup Data (Warm Database Restore)

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore the latest backup data:

  1. From the CommCell Browser, right-click the SQL server or database you want to restore, click All Tasks, and click Browse SQL Server or Browse SQL Instance as appropriate.
  2. From the Browse Options dialog box, click Database, make any other desired selections in the dialog box, and then click OK.
  3. From the Latest Data window, click the database that you want to restore and then click Recover All Selected.
  4. From the SQL Restore Options dialog box, select the destination server that is to receive the database.
  5. From the Restore Types list, click Latest Backup Data. Then make any other selections in this dialog box as appropriate.
    If you do not need to view the database you can select a recover type of NORECOVER.
  6. Click Advanced | Options to verify that the destination drive appears in the Advanced Restore Options dialog box. Click OK to return to the SQL Restore Options dialog box.

    When restoring encrypted data, refer to Data Encryption.

  7. After completing your selections, you can schedule the restore.

    You can track the progress of the restore job using the Job Controller. While the job is running, you can right-click the job in the Job Controller and select Detail to view information on the job.

  8. After the data has been restored, you will see a job completion message in the Job Controller and Event Viewer.

NOTES


Skip Full Backup

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To skip the restore of the last full backup:

  1. Begin any restore procedure.
  2. When you reach the SQL Restore (General) dialog box, select Skip Full Backup.
  3. Continue your restore.

NOTES


Unconditionally Overwrite Existing Database or Files

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To unconditionally write to the specified location and overwrite the files of any database:

  1. Begin any restore procedure.
  2. When you reach the SQL Restore (General) dialog box, select Unconditionally overwrite existing database or files.
  3. Continue your restore.

Restore with a Different Data File Path (Copy a Database)

Before You Begin

Note, that if the database file path is changed, without changing the name of the database, then the existing database will be overwritten and will point to the new location.

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore with a different data file path:

  1. Begin any SQL Server restore procedure.
  2. When you reach the SQL Restore (General) dialog box, click Advanced.
  3. From the Options tab of the Advanced Restore Options dialog box, in the Physical Path column, click each of the files of the database you want to redirect and change the path and/or filename to a new value. If there are many files in the database you want to move, click Find & Replace and enter the necessary values to change them all at once. If the path entered does not exist, it will be automatically created during the restore operation.
  4. Continue the restore procedure.

Restore to a Different SQL Server Instance

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore to a different SQL Server instance:

  1. Begin any SQL Server restore procedure.
  2. When you reach the SQL Restore (General) dialog box, select the target server from the Destination Server list.
  3. Continue the restore procedure.

Back Up the Tail of the Transaction Log

In the event of a database failure, if it is unacceptable to lose changes made to your database since the last backup, you need to back up the tail of the transaction log prior to running a restore.

Before You Begin

The requirements to accomplish this are:

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To back up the Log Tail:

  1. Right-click the database, click All Tasks (if appropriate), and click Backup or Backup SQL Server.
  2. Select Run Immediately, the Transaction Log backup type, the Do Not Truncate Log check box, and click OK.

The use of a log tail backup in your restore job is no different than using a standard log backup and, in fact, appears in your Restore Options dialog box as a standard log backup.

Now you're ready to restore. Refer to Restore a Database to the Point of Failure to select the appropriate restore job.


Restore a Single Database Without Browsing

Use this procedure when you want to retrieve the latest backup job.

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes) To restore a database without browsing:

  1. From the CommCell Browser, right-click the database that contains the data you want to restore, click All Tasks and then click Restore Database.
  2. In the SQL Restore (General) dialog box, from the Restore Time list, select the backup you want to restore. Based on the selected Restore Time options, the necessary backups are restored.
  3. When restoring encrypted data, refer to Using Data Encryption.
  4. Start the restore.
  5. If you are restoring the master database, you are informed that the SQL server must be stopped. Click Yes to continue or No to cancel the restore job without shutting down SQL server.

Restore One or More Files or File Groups

Before You Begin:

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To perform a SQL Server file/file group restore job:

  1. From the CommCell Browser, right-click the database that contains the files or file groups you want to restore, click All Tasks and then click Browse SQL Instance.
  2. In the Browse Options dialog box, click File/File Groups. Then click OK to accept all defaults to browse the latest backups for the selected data or see Browsing Data for a list of customized browse operations and their step-by-step instructions.
  3. From the Browse window, select one or more files or file groups. See Select Objects From the Browse Window for Restore/Recover for more information.
  4. Continue with your restore. When restoring encrypted data, refer to Data Encryption.
  5. Click OK to start the restore.

Restore the Entire Database at the File/File Group Level

Before You Begin:

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore an entire SQL Server database through File/File Groups:

  1. From the CommCell Browser, right-click the database you want to restore, click All Tasks and then click Browse SQL Instance.
  2. In the Browse Options dialog box, click File/File Groups, select the appropriate browse time option, and click OK
  3. In the Browse window, select the database in the left pane, and click Recover All Selected.
    If you are planning to restore only certain files or file groups, use Restore One or More Files or File Groups procedure.
  4. In the SQL Restore dialog box, the Database Restore option should be already selected. Select additional restore options as needed.
  5. When restoring encrypted data, refer to Data Encryption.
  6. Click OK to start the restore.

Restore a SQL Server Database with a Different Name (Move a Database)

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore a SQL Server database with a different name:

  1. Begin any SQL Server restore procedure.
  2. When you reach the SQL Restore (General) dialog box, click Advanced.
  3. From the Options tab of the Advanced Restore Options dialog box, in the Database column, click each database you want to rename, and change the name to the new value. When a change is made to one database in this column, the change is automatically propagated to the other files of the same database.
  4. Continue your restore.

Restore Multiple SQL Server Databases to a Consistent Time

Before You Begin

Required Capability: See Capabilities and Permitted Actions

wedge.gif (136 bytes)To restore multiple databases to a consistent time:

  1. For each instance: From the CommCell Browser, right-click an instance, click All Tasks and then click Browse SQL Instance.
  2. Browse for databases based on the criteria correct for your situation. For more information, refer to Browsing Data.
  3. Select the non-system databases you want to restore and click Recover All Selected.
  4. In the SQL Database Restore Options dialog box, follow the procedure you want to execute:

Set the VDI Time-out Value for Large SQL Database Restores

Before You Begin

The VDI Timeout setting will be applied to all SQL Server iDataAgents on this client.

Required Capability: See Capabilities and Permitted Actions

To set the VDI time-out value:

  1. From the CommCell Browser, right-click the SQL Server instance that contains the data files you want to restore, and click Properties from the shortcut menu.
  2. From the General tab, increase the VDI Timeout, and click OK.
  3. After changing the VDI Timeout setting, begin any restore procedure as usual.