## Transport

Im Folgenden sollen einige Beispiele des Transports von Daten (Export mit anschließendem Import) mit dem Loader CLI im Transportmodus vorgestellt werden.

### Voraussetzungen

Eine Beschreibung der Voraussetzungen finden Sie im Abschnitt Transportmodus.

### Transport ausführen

Sie wollen den Datenbankkatalog und die Anwendungsdaten des Schemas HOTEL des Benutzers MONA zwischen den Datenbanken DEMODB und TESTDB transportieren.

loadercli -p

Package history: C:\Documents and Settings\anna\Application Data\sdb\loader\log\transport.log
Package path: c:\transport
Package name: 20060302090909

Step 1: Enter a package path
Package path: c:\transport

Step 2: Enter a package comment
Package comment: transport

Step 3: What do you want to do
[1] Transport from a source database into a target database
[2] Export from a source database
[3] Import into a target database

Step 3: 1

Step 4: What do you want to do
[1] Choose a transport package
[2] Create a transport package

Step 4: 2

Step 5: Enter the source database connection
Database computer : genua
Database name : demodb
Database user : mona
Password : red

Step 6: Enter the target database connection
Database computer : genua
Database name : testdb
Database user : mona
Password : red

Step 7: Choose what you want include into the package

[1] Complete user
[2] Complete user, excluding some tables
[3] Complete schema
[4] Complete schema, excluding some tables
[5] Schema tables

Step 7: 1

Step 8: Choose the transformation streams
[1] Catalog and data
[2] Catalog
[3] Data

Step 8: 1

Step 9: The package can be executed or generated now.
[1] Execute package to transport data now
[2] Generate package to execute it later

Step 9: 1
Transport package name : 20060302090909
Transport package comment : transport
Transport package creation : 20060302090909
Transport package execution : 20060302090909
Transport package path : c:\transport
Transport package status [-T]: EXECUTE
Transport direction [-t]: TRANSPORT
Transport package [-p]: USER
Transport part [-P]: USER
Transport streams [-s]: CATALOG,DATA,PACKAGE
Transport format [-f]: RECORDS
Transport format [-F]: ROW
Transport encoding [-c]:
Transport lobcolumn [-l]: TABLE
Source database computer [-nSRC]: GENUA
Source database name [-dSRC]: DEMODB
Source database user [-uSRC]: MONA
Target database computer [-nTRC]: GENUA
Target database name [-dTRC]: TESTDB
Target database user [-uTRC]: MONA

Step 10: Continue
[1] OK
[2] CANCEL

Step 10: 1

EXPORT USER
CATALOG OUTSTREAM PIPE 'MONA.CATALOG' DDL
DATA OUTSTREAM PIPE 'MONA.DATA' RECORDS
;

IMPORT USER UPDATE DUPLICATES
CATALOG INSTREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;

Package execution time: 11.625s
Package execution log : loader_20060302090909
Package name : 20060302090909

Die Loader-Kommandos, die während der Ausführung des Transportpakets 20060302090909 abgearbeitet werden, können Sie in der Protokolldatei loader_20060302090909.log einsehen.

#### Transport erneut ausführen

Wenn Sie den soeben ausgeführten Transport im Transportmodus erneut ausführen möchten, geben Sie beim Aufruf des Loader CLI den Namen des Transportpakets an:

loadercli –p 20060302090909

Step 1: Enter the source database connection
Database computer : genua
Database name : demodb
Database user : mona
Password : red

Step 2: Enter the target database connection
Database computer : genua
Database name : testdb
Database user : mona
Password : red

Transport package name : 20060302090909
Transport package comment : transport
Transport package creation : 20060302090909
Transport package execution : 20060302101010
Transport package path : c:\transport
Transport package status [-T]: EXECUTE
Transport direction [-t]: TRANSPORT
Transport package [-p]: USER
Transport part [-P]: USER
Transport streams [-s]: CATALOG,DATA,PACKAGE
Transport format [-f]: RECORDS
Transport format [-F]: ROW
Transport encoding [-c]:
Transport lobcolumn [-l]: TABLE
Source database computer [-nSRC]: GENUA
Source database name [-dSRC]: DEMODB
Source database user [-uSRC]: MONA
Target database computer [-nTRC]: GENUA
Target database name [-dTRC]: TESTDB
Target database user [-uTRC]: MONA

EXPORT USER
CATALOG OUTSTREAM PIPE 'MONA.CATALOG' DDL
DATA OUTSTREAM PIPE 'MONA.DATA' RECORDS
;

IMPORT USER UPDATE DUPLICATES
CATALOG INSTREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;

Package execution time: 6.953s
Package execution log : loader_20060302101010
Package name : 20060302090909

Die Loader-Kommandos, die während der Ausführung des Transportpakets 20060302090909 abgearbeitet werden, können Sie in der aktuellen Protokolldatei loader_20060302101010.log einsehen.

#### Transportpaket generieren

Wenn Sie ein Transportpaket nur generieren, jedoch noch nicht ausführen wollen, verfahren Sie wie folgt:

loadercli -p

Package history: C:\Documents and Settings\anna\Application Data\sdb\loader\log\transport.log
Package path: c:\transport
Package name: 20060302141414

Step 1: Enter a package path
Package path: c:\transport

Step 2: Enter a package comment
Package comment: transport_generate

Step 3: What do you want to do
[1] Transport from a source database into a target database
[2] Export from a source database
[3] Import into a target database

Step 3: 1

Step 4: What do you want to do
[1] Choose a transport package
[2] Create a transport package

Step 4: 2

Step 5: Enter the source database connection
Database computer : genua
Database name : demodb
Database user : mona
Password : red

Step 6: Enter the target database connection
Database computer : genua
Database name : testdb
Database user : mona
Password : red

Step 7: Choose what you want include into the package

[1] Complete user
[2] Complete user, excluding some tables
[3] Complete schema
[4] Complete schema, excluding some tables
[5] Schema tables

Step 7: 1

Step 8: Choose the transformation streams
[1] Catalog and data
[2] Catalog
[3] Data

Step 8: 1

Step 9: The package can be generated or executed now.
[1] Execute package to transport data now
[2] Generate package to execute it later

Step 9: 2
Transport package name : 20060302141414
Transport package comment : transport_generate
Transport package creation : 20060302141414
Transport package execution : 20060302141414
Transport package path : c:\transport
Transport package status [-T]: GENERATE
Transport direction [-t]: TRANSPORT
Transport package [-p]: USER
Transport part [-P]: USER
Transport streams [-s]: CATALOG,DATA,PACKAGE
Transport format [-f]: RECORDS
Transport format [-F]: ROW
Transport encoding [-c]:
Transport lobcolumn [-l]: TABLE
Source database computer [-nSRC]: GENUA
Source database name [-dSRC]: DEMODB
Source database user [-uSRC]: MONA
Target database computer [-nTRC]: GENUA
Target database name [-dTRC]: TESTDB
Target database user [-uTRC]: MONA

Step 9: Continue
[1] OK
[2] CANCEL

Step 9: 1

EXPORT USER
CATALOG OUTSTREAM PIPE 'MONA.CATALOG' DDL
DATA OUTSTREAM PIPE 'MONA.DATA' RECORDS
;

IMPORT USER UPDATE DUPLICATES
CATALOG INSTREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;

Package execution time: 8.484s
Package name : 20060302141414

#### Generiertes Transportpaket ausführen

Wenn Sie die generierten Transportinformationen im Transportmodus ausführen möchten, geben Sie beim Aufruf des Loader CLI den Namen des Transportpakets an:

loadercli –p 20060302141414

Step 1: Enter the source database connection
Database computer : genua
Database name : demodb
Database user : mona
Password : red

Step 2: Enter the target database connection
Database computer : genua
Database name : testdb
Database user : mona
Password : red

Transport package name : 20060302141414
Transport package comment : transport_generate
Transport package creation : 20060302141414
Transport package execution : 20060302151515
Transport package path : c:\transport
Transport package status [-T]: EXECUTE
Transport direction [-t]: TRANSPORT
Transport package [-p]: USER
Transport part [-P]: USER
Transport streams [-s]: CATALOG,DATA,PACKAGE
Transport format [-f]: RECORDS
Transport format [-F]: ROW
Transport encoding [-c]:
Transport lobcolumn [-l]: TABLE
Source database computer [-nSRC]: GENUA
Source database name [-dSRC]: DEMODB
Source database user [-uSRC]: MONA
Target database computer [-nTRC]: GENUA
Target database name [-dTRC]: TESTDB
Target database user [-uTRC]: MONA

EXPORT USER
CATALOG OUTSTREAM PIPE 'MONA.CATALOG' DDL
DATA OUTSTREAM PIPE 'MONA.DATA' RECORDS
;

IMPORT USER UPDATE DUPLICATES
CATALOG INSTREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;

Package execution time: 6.781s
Package execution log : loader_20060302151515
Package name : 20060302141414

Die Loader-Kommandos, die während der Ausführung des Transportpakets 20060302141414 abgearbeitet werden, können Sie in der aktuellen Protokolldatei loader_20060302151515.log einsehen.

Siehe auch:

Export

Import

Kommandodateimodus

Sitzungsmodus

Loader, Protokolldatei