Restore Overview

The simplest form of the RESTORE DATABASE command requires only that you specify the alias name of the database that you want to restore.

For example:

					db2 restore db sample


This will restore the image from the path the restore command is run from.

In this example, because the SAMPLE database exists, the following message is returned:

					SQL2539W Warning! Restoring to an existing database that is the same as the backup image
 database. The database files will be deleted.
					Do you want to continue ? (y/n)

If you enter Y, and a backup image for the SAMPLE database exists in the directory, the restore operation will be performed. ...

Get Advanced DBA Certification Guide and Reference for DB2® Universal Database™ v8 for Linux®, UNIX®, and Windows® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.