Example: Recovering table space data using Db2 backup files

In this example, Optimâ„¢ High Performance Unload unloads all tables in one table space. If the EMPLOYEE table contains long data in a separate table space, Optim High Performance Unload issues an error message.

If you want to unload all of the tables in a table space, do not use the SELECT block. When this happens, the file name in the OUTFILE clause will be only the first part of the complete output file name and the table name will be appended to each output file.

GLOBAL CONNECT TO SAMPLE;
UNLOAD TABLESPACE USERSPACE1
	FLUSH BUFFERPOOLS NO
	LOCK NO
	OUTFILE("tbs_backup.out")
	FORMAT DEL
	USING BACKUP DATABASE SAMPLE TABLESPACE ("tbs_name") 
	FROM "/backup/bck1","/backup/bck2";
	;