Esempio 5: scaricamento di un intero tablespace o database

Nel caso di uno scaricamento globale, uno scaricamento di un intero database o uno scaricamento di un intero tablespace, le tre parole chiave%{tablespace_name},%{table_schema} e%{table_name} vengono applicate automaticamente alle specifiche delle clausole OUTFILE, LOADFILE e DDLFILE, se tali parole chiave non sono già state utilizzate in tali clausole. Ciò viene fatto per differenziare i file generati per ogni tabella considerata.

Ecco un estratto di un Optim™ High Performance Unload per un UNLOAD senza parole chiave specifiche del modello nelle clausole OUTFILE e LOADFILE:


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 questo esempio, OUTFILE ("outfile") la specifica è stata automaticamente sostituita da

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

La specifica delle parole chiave modello nella clausola OUTFILE e LOADFILE consente di definire un modello diverso.

Nota: non è obbligatorio specificare esplicitamente tutte e tre le parole chiave in tutte le clausole, come mostrato nell'esempio riportato di seguito:


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