Ejemplo 5: Descargando un espacio de tabla completo o una base de datos
En el caso de una descarga global, ya sea una descarga de una base de datos completa o una descarga de un espacio de tabla completo, las tres palabras clave %{tablespace_name}, %{table_schema} y %{table_name} se aplican automáticamente a las especificaciones de las cláusulas OUTFILE, LOADFILE y DDLFILE, si estas palabras claves no se han utilizado ya en las cláusulas. Esto se lleva a cabo para diferenciar los archivos generados para cada tabla tenida en cuenta.
A continuación se muestra un extracto de un informe Optim™ High Performance Unload para un UNLOAD sin palabras clave de plantilla específicas en las cláusulas OUTFILE y 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
En este ejemplo, la especificación OUTFILE("outfile") se ha sustituido automáticamente por
OUTFILE(“outfile_%{tablespace_name}_%{table_schema}_%{table_name}”)
La especificación de las palabras clave de la plantilla en la cláusula OUTFILE y LOADFILE permite definir otro patrón.
Nota: No es obligatorio especificar explícitamente estas tres palabras clave en todas las cláusulas, tal y como se muestran en el ejemplo siguiente:
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