# How to recover a DB2 table space TABSPC1 using the image copy TOLASTCOPY?

DB2DatabaseBig Data Analytics

The DB2 provides an utility RECOVER which is used to restore the tablespace. This utility uses image copy and DB2 logs to restore the changes. The following command can be used to recover the tablespace to the last image copy that was taken.

RECOVER TABLESPACE DBSET1.TABSPAC1 TOLASTCOPY

The RECOVER TABLESPACE is followed by the name of tablespace qualified by the database in which it resides. The TOLASTCOPY parameter will restore the image copy in the following way. If the most recent image copy is full image copy, then the full image copy is restored in the tablespace. If the most recent image copy is the incremental image copy then the latest full image copy will be restored along with the recent incremental image copy.

Published on 12-Sep-2020 14:57:02