DRDA-Server
Posted in 1995
SQL-Queries involving a DRDA-Server and a OnLine-Server
=======================================================
We are trying to commit a SQL-query which selects data from a DRDA-
application server and inserts the selected data into an OnLine server.
We can not make it work, neither by running the query in an INFORMIX-
4gl program nor in dbaccess.
We tried two versions with two databases:
- testdb@online1 -> database 'testdb' on OnLine server 'online1'
- alias_db2@gwd1 -> database 'alias_db2' on DRDA server 'gwd1'
Version 1 being connected to the DRDA server
(dbaccess)
:SQL: New Run Modify Use-editor Output Choose Save Info Drop
:Run the current SQL statements.
:
:----------------------- alias_db2@gwd1 --- Press CTRL-W for Help -
:
:begin work;
:insert into testdb@online1:inxti01
: select mitgl_n, fam_n, gbeg_d
: from alias_db2@gwd1:kke.ti01;
:commit work;
Version 2 being connected to the OnLine server (4gl-program)
:DATABASE testdb@online1 # OPEN OnLine-Database
:
:IF (SQLCA.SQLCODE < 0)
: THEN
: RETURN FALSE
:END IF
:
:BEGIN WORK
: INSERT INTO inxti01
: SELECT mitgl_n, fam_n, gbeg_d
: FROM alias_db2@gwd1:kke.ti01
:COMMIT WORK
:
:IF (SQLCA.SQLCODE < 0)
: THEN
: RETURN FALSE
:END IF
:
:CLOSE DATABASE
The result of version 1 is this error-message.
:29052: Gateway cannot access the RDB with alias-RDB-name testdb.
Running version 2 the envolved processes hang and have to be killed!
Creating a synonym in the OnLine database for the table in the DRDA
database causes the same problem like version 2.
We have no problems to transfer data between two OnLine servers.
It is also possible to set up a single select-query being connected
to the DRDA server.
:SQL: New Run Modify Use-editor Output Choose Save Info Drop
:Run the current SQL statements.
:
:----------------------- alias_db2@gwd1 --- Press CTRL-W for Help -
:
:begin work;
:select mitgl_n, fam_n, gbeg_d
: from alias_db2@gwd1:kke.ti01;
:commit work;
:
: mitgl_n fam_n gbeg_d
:
: 2100 1 19950312
: 2000 1 19950302
: 1004 1 19950302
: 1003 1 19950302
We also made sure that the logging mode of both the DRDA- and OnLine-
server are equal!
Our environment is configured as follows:
- shell environment where the query runs (user informix)
$informix>env
SQLEXEC=/informix/lib/sqlrm
LANG=C
PATH=/informix/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/.
INFORMIXSQLHOSTS=/informix/etc/sqlhostsLOGNAME=informix
HOST=host01
TERMCAP=/informix/etc/termcap
USER=informix
SHELL=/bin/ksh
INFORMIXTERM=vt100HOME=/home/informix
INFORMIXDIR=/informixTERM=vt100
ONCONFIG=onconfig.online1
INFORMIXSERVER=online1
- shell-script to start gateway-deamon (user root, ksh)
:export INFORMIXDIR=/informix
:export LANG=C
:export SQLEXEC=$INFORMIXDIR/lib/sqlrm
:export DBPATH=$INFORMIXDIR/forms
:export INFORMIXSERVER=gwd1
:export GWDEBUG=1
:export PATH=$PATH:$INFORMIXDIR/lib
:
:rm -f /tmp/gw.log
:gwd gwd1 -s gw -l /tmp/gw.log
- the sqlhosts-file
#********************************************************************
#
# Title: sqlhosts
# Sccsid: @(#)sqlhosts 1.0 06.02.95 12:30
# Description: Default sqlhosts file.
#
# DB-Server Nettype Hostname Servicename
#********************************************************************
online1 onipcshm host01 online1
online1soc onsoctcp host01 server01alias_db2 drapplu6 CHIDRZ01AD2AIE01 m=ad2aie01
gwd1 onsoctcp host01 gw_service
- our software versions
INFORMIX-Gateway whith DRDA V6.10.UC1
INFORMIX-OnLine V6.00.UE1
INFORMIX-4gl V4.12.UE2
Who can tell us what's wrong? Every answer is appreciated!
Thanks!!!
Daniel Binder