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
				

NOTE

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.