HiRDB Dataextractor Version 8 Description, User's Guide and Operator's Guide

[Contents][Index][Back][Next]

5.3 Examples

This section presents execution examples of HiRDB Dataextractor. Figure 5-1 shows the system configuration for the execution examples.

Figure 5-1 System configuration for execution examples (when data is extracted from an ORACLE database)

[Figure]

Organization of this section
(1) Environment for execution examples
(2) Execution examples

(1) Environment for execution examples

(a) Environment on the data source system (HOST1)

Table definition
Table name Column names and attributes
TORA01 C01 CHAR(10), C02 NUMBER(10,8), C03 DATE
TORA02 C01 CHAR(10), C02 NUMBER(10,8), C03 NUMBER

Specification of environment variables
$ORACLE_BASE /ORACLE8/ORACLE
$ORACLE_HOME /ORACLE8/ORACLE/product/8.1.6
$ORA_NLS33   /ORACLE8/ORACLE/product/8.1.6/ocommon/nls/admin/data
$NLS_LANG    Japanese_Japan.JA16SJIS
$ORACLE_SID  hds1
$ORACLE_TERM hp
$XTORAUSER   "user01"/"user01"
$PATH        /opt/HIRDBXT/bin
$LANG        ja_JP.SJIS
$XTHOST      HOST2
$XTPORTNO    20052

Specification in /etc/hosts at the importing host
        :
        :
160.16.150.120  HOST2
160.16.150.121  HOST3
        :
        :
(b) Environment on the data target system (HOST2)

Table definition

Definition of port in /etc/services
                      :
                      :
hirdbxt1 20052/tcp    # HiRDB Dataextractor
hirdbxt2 50000/tcp    # HiRDB Dataextractor
                      :
                      :

Definition for HiRDB Dataextractor startup in /etc/inetd.conf
                      :
                      :
hirdbxt1 stream tcp nowait user01
/opt/HIRDBXT/bin/pxtcntl pxtcntl /usr/home/user01/xtenv1
hirdbxt2 stream tcp nowait user02
/opt/HIRDBXT/bin/pxtcntl pxtcntl /usr/home/user02/xtenv2
                      :
                      :

Specification of environment variables in the environment variable information specification file
(c) Environment on the file creation system (HOST3)

Definition of port in /etc/services
                     :
                     :
hirdbxt 20052/tcp    # HiRDB Dataextractor
                     :
                     :

Definition for HiRDB Dataextractor startup in /etc/inetd.conf
                     :
                     :
hirdbxt stream tcp nowait user01
/opt/HIRDBXT/bin/pxtcntl pxtcntl /usr/home/user01/xtenv
                     :
                     :

Specification of environment variables in the environment variable information specification file

(2) Execution examples

Specify the xtrepO command on the data source system.

(a) Example 1

Copy table TORA01 at HOST1 into table T01 at HOST2. Specify the following options:

Command specification
xtrepO -r T01 -s /usr/home/user01/clm TORA01

Contents of /usr/home/user01/clm
C01,C02,C03,C04
(b) Example 2

Copy table TORA02 at HOST1 into table T02 at HOST2. Specify the following options:

Command specification
xtrepO -r T02 -d -l n -n 255 -m 100 -g -s /usr/home/user01/clm
-v /usr/home/user01/null -w /usr/home/user01/whr TORA02

Contents of /usr/home/user01/clm
C01,C02,C03,0

Contents of /usr/home/user01/whr
WHERE C01<='0000010000'

Contents of /usr/home/user01/null
1=NUM=('FFFFFFFFFF')
(c) Example 3

Copy table TORA01 at HOST1 into table T03 at HOST2. Specify the following options:

Command specification
xtrepO -d -r t03 -n 40 -p 50000
       -e /tmp/xtrep_log -g /usr/home/user01/lck TORA01

Contents of /usr/home/user01/lck
IN EXCLUSIVE MODE NOWAIT
(d) Example 4

Output table TORA01 at HOST1 to a file at HOST3. Specify the following options:

Command specification
xtrepO -R dat -o TORA01 -h HOST3 -s /usr/home/user01/clm TORA01

Contents of /usr/home/user01/clm
C01,C02,C03
(e) Example 5

Output table TORA01 at HOST1 to a file at HOST3. Specify the following options:

Command specification
xtrepO -R -o TORA01_BIN -h HOST3 -m 50
-s /usr/home/user01/clm -w /usr/home/user01/whr -L
/usr/home/user01/cnv TORA01

Contents of /usr/home/user01/clm
C01,C02,C03

Contents of /usr/home/user01/whr
WHERE C01<='0000010000'

Contents of /usr/home/user01/cnv
FORMAT FIELD_NUM 1 ATTR MCHAR(20)
       FIELD_NUM 3 ATTR TIME