Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
7.1 Migrating a DB2 database using a redirected restore operation The easiest way to physically move a DB2 database from one storage location to another is by backing up the database with DB2's BACKUP DATABASE command and then performing what is known as a redirected restore operation to copy the database to its new location. Redirected restore operations are performed by executing a combination of DB2's RESTORE DATABASE and SET TABLESPACE CONTAINERS commands once a backup image of the database has been obtained. The steps needed to perform this type of DB2 database migration are: 1. Establish a connection to the database to be migrated by issuing the following command: db2 "CONNECT TO [DB_NAME]" Where - DB_NAME is the database alias or name. For example, you would execute the following command on the database server to connect to a database named mydb: db2 "CONNECT TO mydb" 2. List the tablespaces that have been created for the database to be migrated by executing the following command: