Esempi: scaricamento di dati da un database Db2 Warehouse
Per i due esempi seguenti, Optim™ High Performance Unload scaricherà i dati da un database Db2® Warehouse. Il nome del database è 'BLUDB 'e la tabella coinvolta in questa esecuzione è ‘TABLE1’. Il server Db2 Warehouse è ‘DB2WAREHOUSE_IP:50000’ dove DB2WAREHOUSE_IP è l'url / nome host del server Db2 Warehouse e 50000 è il numero di porta associato al servizio Db2 Warehouse .
Per la prima esecuzione, Optim High Performance Unload utilizzerà un file di controllo:
Report di esecuzione
[i1058@lat111 ~]$ db2hpu -i i1058 -f sysin --warehouse DB2WAREHOUSE_SOURCE
INZM031I Optim High Performance Unload for Db2 06.01.00.001(170424)
64 bits 04/24/2017 (Linux lat111 3.10.0-327.36.1.el7.x86_64 #1 SMP Wed Aug 17 03:02:37 EDT 2016 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 BLUDB URL "DB2WAREHOUSE_IP" PORT "50000" ;
000002 UNLOAD TABLESPACE
000003 SELECT * FROM TABLE1;
000004 OUTFILE("outfile")
000005 FORMAT DELIMITED;
INZU462I HPU control step start: 04/24/2017 11:56:18.124.
INZU102I DB2 FORCE specified, will process through DB2.
INZU463I HPU control step end : 04/24/2017 11:56:18.179.
INZU464I HPU run step start : 04/24/2017 11:56:18.180.
INZU410I HPU utility has unloaded 6 rows on lat111 host for USER1.TABLE1 in outfile.
INZU465I HPU run step end : 04/24/2017 11:56:18.454.
INZI441I HPU successfully ended: Real time -> 0m0.330399s
User time -> 0m0.245847s : Parent -> 0m0.245847s, Children -> 0m0.000000s
Syst time -> 0m0.049574s : Parent -> 0m0.049574s, Children -> 0m0.000000s
Sezione credenziali Db2 Warehouse associate per questa esecuzione:
[DB2WAREHOUSE_SOURCE]
type=warehouse
user=user1
password=XXXXXXPer questa seconda esecuzione, basata sulla stessa definizione delle credenziali del magazzino, Optim High Performance Unload utilizzerà le specifiche delle opzioni della riga di comando --database e --table :
Report di esecuzione
[i1058@lat111 ~]$ db2hpu -i i1058 --database BLUDB:DB2WAREHOUSE_IP:50000 --table TABLE1 --warehouse DB2WAREHOUSE_SOURCE --output outfile
INZM031I Optim High Performance Unload for Db2 06.01.00.001(170426)
64 bits 04/26/2017 (Linux lat111 3.10.0-327.36.1.el7.x86_64 #1 SMP Wed Aug 17 03:02:37 EDT 2016 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 BLUDB URL "DB2WAREHOUSE_IP" PORT "50000";
000002 UNLOAD TABLESPACE
000003 PART(ALL)
000004 DB2 FORCE
000005 SELECT * FROM "TABLE1";
000006 OUTFILE("outfile")
000007 ;
INZU462I HPU control step start: 04/26/2017 15:56:38.783.
INZU102I DB2 FORCE specified, will process through DB2.
INZU463I HPU control step end : 04/26/2017 15:56:38.910.
INZU464I HPU run step start : 04/26/2017 15:56:38.913.
INZU410I HPU utility has unloaded 6 rows on lat111 host for USER1.TABLE1 in outfile.
INZU465I HPU run step end : 04/26/2017 15:56:39.743.
INZI441I HPU successfully ended: Real time -> 0m0.959734s
User time -> 0m0.253916s : Parent -> 0m0.253916s, Children -> 0m0.000000s
Syst time -> 0m0.047984s : Parent -> 0m0.047984s, Children -> 0m0.000000s