13.5. Database and Table Space Recovery Using the RESTORE DATABASE Command

You can restore the backup image obtained by the BACKUP DATABASE command using the RESTORE DATABASE command. You can choose to recover the entire database or just the individual table space(s).

13.5.1. Database Recovery

You can restore a database backup image into a new or existing database. You need SYSADM, SYSCTRL, or SYSMAINT authority to restore into an existing database, and SYSADM or SYSCTRL authority restore to a new database.

This syntax of the RESTORE command is:

						RESTORE DATABASE
						source-database_alias
						{
						restore_options
						| CONTINUE | ABORT }
					

You can use one or more of the following for restore_options:

						[USER
						username
						[USING
						password]] [{TABLESPACE [ONLINE] | ...

Get Understanding DB2®: Learning Visually with Examples 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.