In transport mode the user is interactively prompted for input to export application data from one database and import it into another database. The input parameters and the Loader configuration file can be used to generate the syntax of the Loader commands and to execute the requested transformation (transport, export, import).
·
Examples for the transport:
Execute transport, repeat transport
Generate transport package, execute generated transport package
Execute transport in command mode
Execute transport in session mode
·
Examples for the export
Execute exports, repeat export
Generate export package, execute generated export package
Execute export in command file mode
·
Examples for the
import
Execute import, repeat import
You want to transport the database catalog and the application data of the HOTEL schema of user MONA between databases DEMODB and TARGETDB.
loadercli -p
Step 1: 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 1: 1
Step 2: Enter the source database connection
Database computer:
Database name : demodb
Database
user : mona
Password:
Database schema:
hotel
Step 3: Enter the target database connection
Database computer:
Database name : targetdb
Database
user : mona
Password:
Database schema:
hotel
Step 4: Choose what you want include into the package
[1] The complete schema
[2] The complete schema, excluding some tables
[3] Some schema
tables
Step 4: 1
Step 5: Choose the transformation streams
[1] Catalog and data
[2] Catalog
[3] Data
Step 5: 1
Step 6: The package can be generated or executed
now.
[1] Generate package to execute it later
[2] Execute package to transport data now
Step 6: 2
Step 7: Continue
[1] OK
[2] CANCEL
Step 7: 1
Transformation package guid:
0100000073F993F8C00800006F710000B6ABE7A9F7DA0210
Transformation package timestamp: 20050512162910
Transport schema: HOTEL
Transformation package name: 20050512162910
Transformation package time: 11.748s
You can see the Loader commands that are processed when the transport package is executed in command file 20050512162910.prt.
The output of the Loader for this transport file is located in the log file between the keywords START PACKAGE and END PACKAGE.
START
PACKAGE x'0100000073F993F8C00800006F710000B6ABE7A9F7DA0210’ WITH
TIMESTAMP 20050512162910
...
END PACKAGE x'0100000073F993F8C00800006F710000B6ABE7A9F7DA0210’ WITH
TIMESTAMP
20050512162910
If you want to repeat the transport you just executed in transport mode, proceed as follows:
loadercli –p 20050512162910
Step 1: Enter the source database connection
Database computer:
genua
Database name : demodb
Database
user : mona
Database
schema:
hotel
Password: red
Step 2 Enter the target database connection
Database computer: genua
Database name : targetdb
Database
user : mona
Database
schema:
hotel
Password: red
Transformation package guid:
0100000073F993F8C00800006F710000B6ABE7A9F7DA0210
Transformation package timestamp: 20050512163000
Transport schema: HOTEL
Transformation package name: 20050512162910
Transformation package time: 17.265s
The output of the Loader for this transport file is located in the log file between the keywords START PACKAGE and END PACKAGE.
START PACKAGE
x'0100000073F993F8C00800006F710000B6ABE7A9F7DA0210’ WITH TIMESTAMP 20050512163000
. ..
END PACKAGE x'0100000073F993F8C00800006F710000B6ABE7A9F7DA0210’ WITH
TIMESTAMP
20050512163000
See also:
If you want to generate a transport package first and execute it later, proceed as follows:
loadercli -p
Step 1: 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 1: 1
Step 2: Enter the source database connection
Database computer:
Database name : demodb
Database user :
mona
Password:
Database schema:
hotel
Step 3: Enter the target database connection
Database computer:
Database name : targetdb
Database user :
mona
Password:
Database schema:
hotel
Step 4: Choose what you want include into the
package
[1] The complete schema
[2] The complete schema, excluding some tables
[3] Some schema
tables
Step 4: 1
Step 5: Choose the transformation streams
[1] Catalog and data
[2] Catalog
[3] Data
Step 5: 1
Step 6: The package can be generated or executed
now.
[1] Generate package to execute it later
[2] Execute package to transport data now
Step 6: 1
Step 7: Continue
[1] OK
[2] CANCEL
Step 7: 1
Transformation packageguid:
01000000921794F8100900001E700000A81B709A3A4930F9
Transformation package timestamp: 20050512183812
Transport schema: HOTEL
Transformation package name: 20050512183812
Transformation package time: 6.138s
You use the following call to execute a generated transport package in transport mode.
loadercli –p 20050512183812 –uSRC mona,red –uTRG mona,red
If transport packages are to be generated or executed, the command file <package_name>.prt is generated. You can directly execute this file in command file mode. To do this, proceed as follows:
Go to package directory <loader_user_data>\packages\export\GENUA\DEMODB\20050512183812.
Start the Loader.
loadercli –b 20050512183812.prt –d demodb –u mona,red –s hotel –E 10
Go to package directory <loader_user_data>\packages\import\GENUA\TARGETDB\20050512183812.
Start the Loader.
loadercli –b 20050512183812.prt –d targetdb –u mona,red –s hotel –E 10
You can execute a transport in session mode . To do this, proceed as follows:
Start the Loader for the export:
loadercli -d demodb –u mona,red –s hotel –E 10 –cs //
Copy the content of command file 20050512183812.prt from the package directory into console input.
Start the Loader for the import:
loadercli –d targetdb –u mona,red –s hotel –E 10 –cs //
Copy the content of command file 20050512183812.prtfrom the package directory into console input.
You want to export table HOTEL of schema HOTEL of user MONA from database DEMODB. The application files are to be exported as files in COMPRESSED Format (CSV format, comma separated values). The values of the column INFO of data type LONG of table HOTEL are to be exported to a separate file for each data record. The loader commands generated in this process are to be output on the console.
loadercli -p
Step 1: 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 1: 2
Step 2: Enter the source database connection
Database computer:
Database name : demodb
Database user :
mona
Password:
Database schema:
hotel
Step 3: Choose what you want include into the
package
[1] The complete schema; one file per schema
[2] The complete schema; one file per schema, excluding some tables
[3] The complete schema; one file per table
[4] The complete schema; one file per table, excluding some tables
[5] Some schema tables ; one file
per table
Step 3: 5
Step 4: Enter the table names you want include into the package
[1] hotel
[2]
Step 5: Choose the transformation streams
[1] Catalog and data
[2] Catalog
[3] Data
Step 5: 1
Step 6: Do you want to specify the data stream
format
[1] Yes
[2] No
Step 6: 1
Step 7: How do you want to export the data
stream
[1] Comma separated values; one file per lob column
[2] Comma separated values; one file per lob value
[3] Fixed width values; one file per lob column
[4] Fixed width values; one file per lob value
[5] Platform independent loader records format (with logging)
[6] Platform independent database page
format (without logging, backup necessary)
Step 7: 2
Step 8: How do you want to import the data
[1] Row by page (without logging, backup necessary)
[2] Row by row (with
logging)
Step 8: 2
Step 9: The package can be generated or executed
now.
[1] Generate package to execute it later
[2] Execute package to transport data now
Step 9: 2
Step 10: Continue
[1] OK
[2] CANCEL
Step 10: 1
Transformation package guid:
0100000079FC93F89C0A0000E7500000A480931B9FC13891
Transformation package timestamp: 20050512170019
Export Table "HOTEL"."HOTEL"
Transformation package name: 20050512170019
Transformation package time: 9.513s
If you want to repeat the export you just executed in transport mode, proceed as follows:
loadercli –p 20050512170019
Follow the procedure described in Executing the Export. However, in step 9 choose the option [1] Generate package to execute it later.
You use the following call to execute a generated export package in transport mode.
loadercli –p 20050512170019 –uSRC mona,red
If transport packages are to be generated or executed, the command file <package_name>.prt is generated. You can directly execute this file in command file mode. To do this, proceed as follows:
Go to package directory <loader_user_data>\packages\export\GENUA\DEMODB\20050512170019
Start the Loader.
loadercli –b 20050512170019.prt –d demodb –u mona,red –s hotel –E 10
You want to import the generated data of the export package 20050512170019 into the HOTEL schema of database user MONA of database TARGETDB.
loadercli –p
Step 1: 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 1: 3
Step 2: Enter the computer and database name of the
exported data
Database computer:
Database name:
demodb
Step 3: Choose the package name of the exported
data
[1]: 20050512165809
[2]: 20050512170019
Step 3: 2
Step 4: Enter the target database connection
Database computer:
Database name : targetdb
Database user :
mona
Password:
Database schema :
hotel
Step 5: Continue
[1] OK
[2] CANCEL
Step 5: 1
Transformation package guid:
01000000A40094F8DC09000057670000A01E3A9C05CB20A3
Transformation package timestamp: 20050512170109
Import Table HOTEL
Transformation package name: 20050512170109
Transformation package time: 6.249s
If you want to repeat the import you just executed in transport mode for another database (TARGETDB2), proceed as follows:
loadercli –p 20050512170019 –t import -dTRG targetdb2 -uTRG mona,red