The following are some examples of data transports (export with subsequent import) where the Loader CLI is in transport mode.
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
The transport mode is available for 32 bit platforms only.
You want to transport the database catalog and the application data of the HOTEL schema for database user MONA between databases DEMODB and TESTDB.
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 to a target database
[2] Export from a source database
[3] Import to 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 to include in 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 STREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;
Package execution time : 11.625s
Package execution log : loader_20060302090909
Package name : 20060302090909
You can see the Loader commands that are processed when transport package 20060302090909 is executed in log file loader_20060302090909.log .
If you would like to repeat the transport you just executed in transport mode, specify the name of the transport package when you call the Loader CLI:
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 format [-f]: RECORDS
Transport format [-F]: ROW
Transport part [-P]: USER
Transport streams [-s]: CATALOG,DATA,PACKAGE
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 STREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;
Package execution time : 6.953s
Package execution log : loader_20060302101010
Package name : 20060302090909
You can see the Loader commands that are processed when transport package 20060302090909 is executed in log file loader_20060302101010.log .
If you want to generate a transport package without executing it, proceed as follows:
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 to a target database
[2] Export from a source database
[3] Import to 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 to include in 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 STREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;
Package execution time : 8.484s
Package name : 20060302141414
If you would like to execute the generated transport information in transport mode, specify the name of the transport package when you call the Loader CLI:
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 STREAM PIPE 'MONA.CATALOG' DDL
DATA INSTREAM PIPE 'MONA.DATA' RECORDS
;
Package execution time : 6.781s
Package execution log : loader_20060302151515
Package name : 20060302141414
You can see the Loader commands that are processed when transport package 20060302141414 is executed in log file loader_20060302151515.log .
Loader, Loader Log File