Restoring partial databases (SQL Server 2000)

This topic shows you how to perform a partial database restore on a SQL Server 2000 database. A partial database restore lets you select individual filegroup components of a database and restore them to a new database having a different name.

Note:

When you prepare your database design, map logically related database components such as tables, indexes, and keys to the same filegroup. This design enables you to use the partial database restore procedure to recover these logically related components as a single unit.

To perform a partial database restore

  1. Browse for the backup images you want to restore.

  2. In the Restore Microsoft SQL Server Objects dialog box, expand the database instance.

  3. Expand the database.

  4. Select the database image that you want to restore.

  5. From the Scripting list, select Create a partial database restore template.

    When you create a move or partial database restore script, the capability to perform an immediate launch is disabled. You must edit the script to specify certain destination parameters.

  6. Click Restore.

  7. In the Save Script As dialog box, type the name of a file to which you want NetBackup to write the template and click Save.

  8. Click Yes to open the template in Notepad.

  9. Replace the database name in the template with the name of the target database of the restore.

    For example, replace:

    #  Replace the database name in the following line with the name of the database that 
    you
    #  want as the target of the partial restore. Also remove the hash mark <#> which 
    precedes
    #  the keyword <DATABASE>.  
    #DATABASE "DatabaseA"
    

    with:

    #  Replace the database name in the following line with the name of the database that 
    you
    #  want as the target of the partial restore. Also remove the hash mark <#> which 
    precedes
    #  the keyword <DATABASE>.  
    DATABASE "DatabaseB"
    
  10. To restore a file, indicate a new file path and uncomment the MOVE and TO lines.

    For example, replace:

    #  If you wish to restore file <C:\Program Files\Microsoft SQL 
    Server\MSSQL\data\Sample2.mdf>,
    #  then replace this path with a new file path. Also remove the hash marks <#>
    #  which precede the keywords <MOVE> and <TO>. 
    #MOVE  "DBA_FG1_File1"
    #TO  "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBA_FG1_File1.ndf"
    

    with:

    #  If you wish to restore file <C:\Program Files\Microsoft SQL 
    Server\MSSQL\data\Sample2.mdf>,
    #  then replace this path with a new file path. Also remove the hash marks <#>
    #  which precede the keywords <MOVE> and <TO>. 
    MOVE  "DBA_FG1_File1"
    TO  "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBB_FG1_File1.ndf"
    
  11. Make similar changes to the template for any differential backups or transaction log backups you want to restore.

  12. When you finish modifying the template, save it.

  13. To run the restore, select File > Manage script files, select the script you created, and click Start.

More Information

Browsing for backup images

Performing page-level restores (SQL Server 2005 or later)