Background documentationImport Locate this document in the navigation structure

 

The following are some examples of data importing with Loader CLI in transport mode.

Prerequisites

You require the demo databases DEMODB and TESTDB.

Start the Loader in transport mode: loadercli -p.

You do not require and knowledge about the Loader syntax in transport mode. The generated Loader commands are, however, displayed on the console and in the Loader files, and can be used as templates for writing your own Loader commands.

Note Note

The transport mode is available for 32 bit platforms only.

End of the note.

Activities

Executing the Import

You want to import table HOTEL of schema HOTEL of database user MONA to database TESTDB. The application data is to be imported as files in CSV format. The values of the column INFO of data type LOB of table HOTEL are to be exported from a separate file for each data record.

loadercli -p

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

Package path: c:\transport

Package name : 20060322131313

Step 1: Enter a package path

Package path: c:\transport

Step 2: Enter a package comment

Package comment: import

Step 3: What do you want to do?

[1] Transport from a source database to a target database

[2] Export from a source database

[3] Import to a target database

Step 3: 3

Step 4: Enter the source database of the export package

Database computer :genua

Database name : demodb

Step 5: Choose an export package

Export package path : c:\transport

Source database computer [-nSRC]: genua

Source database name [-dSRC]: demodb

[1]:

Export package name : 20060322101010

Export package comment : export_generate

[2]:

Export package name : 20060312161616

Export package comment : export

Step 5: 2

Step 6: Enter the target database of the export package

Database computer : genua

Database name : testdb

Database user : mona

Password : red

Step 7: Enter the target database schema

Database schema: hotel

Import package name : 20060322131313

Import package comment : import

Import package creation : 20060322131313

Import package execution  : 20060322131313

Import package path : c:\transport

Import package status [-T]: EXECUTE

Import direction [-t]: IMPORT

Import package [-p]: 20060312161616

Import part [-P]: TABLE

Import streams [-s]: CATALOG,DATA,PACKAGE

Import format [-f]: CSV

Import format [-F]: ROW

Import encoding [-c]:

Import lobcolumn [-l]: COLUMNVALUE

Source database computer [-nSRC]: GENUA

Source database name [-dSRC]: DEMODB

Source database user [-uSRC]: MONA

Target database computer [-nTRG]: GENUA

Target database name [-dTRG]: TESTDB

Target database user [-uTRG]: MONA

Source database table : "HOTEL"."HOTEL"

Step 10: Continue

[1] OK

[2] CANCEL

Step 10: 1

IMPORT TABLE "HOTEL" UPDATE DUPLICATES

CATALOG INSTREAM FILE 'HOTEL.CATALOG' DDL

DATA    INSTREAM FILE 'HOTEL.DATA'    CSV

Start 1 MAXROWS

"HNO" 1 CHAR

"NAME" 1 CHAR

"ZIP" 1 CHAR DEFAULT NULL

"ADDRESS" 1 CHAR

"INFO" 1 CHAR DEFAULT NULL

RECORDS USAGE

  ;

Package execution time   : 25.817s

Package execution log : loader_20060322131313.log

Package name : 20060322131313

In log file loader_20060322131313.log, you can see the Loader commands that are processed when import package 20060322131313 is executed.

Repeating the Import

If you would like to repeat the import you just executed, specify the name of the import package when you call Loader CLI :

loadercli -p 20060322131313

Step 1: Enter the source database connection

Database computer : genua

Database name : demodb

Database user : mona

Password : red

Import package name : 2006032213131

Import package creation : 20060322131313

Import package execution  : 20060322151515

Import package path : c:\transport

Import package status [-T]: EXECUTE

Import direction [-t]: IMPORT

Import package [-p]: 20060312161616

Import part [-P]: TABLE

Import streams [-s]: CATALOG,DATA,PACKAGE

Import format [-f]: CSV

Import format [-F]: ROW

Import encoding [-c]:

Import lobcolumn [-l]: COLUMNVALUE

Source database computer [-nSRC]: GENUA

Source database name [-dSRC]: DEMODB

Source database user [-uSRC]: MONA

Target database computer [-nTRG]: GENUA

Target database name [-dTRG]: TESTDB

Target database user [-uTRG]: MONA

Source database table : "HOTEL"."HOTEL"

IMPORT TABLE "HOTEL" UPDATE DUPLICATES

CATALOG INSTREAM FILE 'HOTEL.CATALOG' DDL

DATA    INSTREAM FILE 'HOTEL.DATA'    CSV

Start 1 MAXROWS

"HNO" 1 CHAR

"NAME" 1 CHAR

"ZIP" 1 CHAR DEFAULT NULL

"ADDRESS" 1 CHAR

"INFO" 1 CHAR DEFAULT NULL

RECORDS USAGE

  ;

Package execution time   : 8.025s

Package execution log : loader_20060322151515.log

Package name : 20060322131313

In log file loader_20060322151515.log, you can see the Loader commands that are processed when import package 20060322131313 is executed.