Example 5: Unloading a whole table space or database

In the case of a global unload, either an unload of a whole database or an unload of a whole table space, the three keywords %{tablespace_name}, %{table_schema} and %{table_name} are automatically applied to the OUTFILE, LOADFILE and DDLFILE clauses specifications, if these keywords have not already been used into those clauses. This is done to differentiate the files generated for each table considered.

Here is an extract of an Optim™ High Performance Unload report for an UNLOAD with no specific template keywords in the OUTFILE and LOADFILE clause:

INZM031I Optim High Performance Unload for Db2 06.01.00.001(120813)
         64 bits 08/13/2012 (Linux lat186 x86_64)
INZI473I Memory limitations: 'unlimited' for virtual memory and 'unlimited' for data segment
       ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----
000001 GLOBAL CONNECT TO SAMPLE;
000002 UNLOAD TABLESPACE USERSPACE1
000003 DB2 NO
000004 OUTFILE("outfile")
000005 LOADFILE("loadfile")
000006 FORMAT DEL;
000007

INZU462I HPU control step start: 15:34:29.221.
INZU463I HPU control step end  : 15:34:29.800.
INZU464I HPU run step start    : 15:34:29.908.                                 
INZU410I HPU utility has unloaded 5 rows on lat186 host for I975.CL_SCHED in outfile_USERSPACE1_I975_CL_SCHED.
INZU442I HPU utility has generated the LOAD file loadfile_USERSPACE1_I975_CL_SCHED (LRECL=0).
...
INZU410I HPU utility has unloaded 35 rows on lat186 host for I975.STAFFG in outfile_USERSPACE1_I975_STAFFG.
INZU442I HPU utility has generated the LOAD file loadfile_USERSPACE1_I975_STAFFG (LRECL=0).
INZU465I HPU run step end      : 15:34:29.936.
INZI441I HPU successfully ended: Real time -> 0m0.715058s
User time -> 0m0.035994s : Parent -> 0m0.035994s, Children -> 0m0.000000s
Syst time -> 0m0.034994s : Parent -> 0m0.034994s, Children -> 0m0.000000s

In this example, the OUTFILE("outfile") specification has been automatically replaced by

OUTFILE(“outfile_%{tablespace_name}_%{table_schema}_%{table_name}”)

The specification of template keywords in the OUTFILE and LOADFILE clause allows to define a different a pattern.

Note: It is not mandatory to specify explicitly all these three keywords in all the clauses, as it is shown in the example below:

INZM031I Optim High Performance Unload for Db2 06.01.00.001(120813) 
         64 bits 08/13/2012 (Linux lat186 x86_64)
INZI473I Memory limitations: 'unlimited' for virtual memory and 'unlimited' for data segment
       ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
000001 GLOBAL CONNECT TO SAMPLE;
000002 UNLOAD TABLESPACE USERSPACE1
000003 DB2 NO
000004 OUTFILE("%{tablespace_name}.%{table_schema}.%{table_name}.outfile")
000005 LOADFILE(“%{tablespace_name}.%{table_schema}.%{table_name}.loadfile")
000006 FORMAT DEL;
000007

INZU462I HPU control step start: 15:34:29.221.
INZU463I HPU control step end  : 15:34:29.800.
INZU464I HPU run step start    : 15:34:29.908.                                 
INZU410I HPU utility has unloaded 5 rows on lat186 host for I975.CL_SCHED in USERSPACE1.I975.CL_SCHED.outfile.
INZU442I HPU utility has generated the LOAD file USERSPACE1.I975.CL_SCHED.loadfile (LRECL=0).
...
INZU410I HPU utility has unloaded 35 rows on lat186 host for I975.STAFFG in USERSPACE1.I975.STAFFG.outfile.
INZU442I HPU utility has generated the LOAD file USERSPACE1.I975.STAFFG.loadfile (LRECL=0).
INZU465I HPU run step end      : 15:34:29.936.
INZI441I HPU successfully ended: Real time -> 0m0.715058s
User time -> 0m0.035994s : Parent -> 0m0.035994s, Children -> 0m0.000000s
Syst time -> 0m0.034994s : Parent -> 0m0.034994s, Children -> 0m0.000000s