Remote Connect Failure thru 4gl
Posted in 1999
Topics: SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Networking & sqlhosts Configuration
Hi:
Hi
I have a question, if isql and dbaccess can connect to remote dbserver (
xxx_svr )
from command line, why 4gl runtime keeps flashing me following message
Attempt to connect to database server (xxx_svr, conerr=-25555, oserr=0)
failed.
I have checked through all services, sqlhosts, .rhosts everything looks
okay as I mentioned isql/dbaccess works fine on the remote server and I
managed to put in couple of select statements which returns perfectly
normal.
Local Informix ver : Informix Dynamic Server 2000 Version 9.20.H
Remote Informix ver : INFORMIX-Universal Server Version 9.14.UC5
Local Host : HP UX B.11.00
Remote Host : HP UX B.10.20
Any clues
Thanks in advance for any help in the matter
Rgds
How are you specifying and using the remote hostname in the 4GL server?
Do you:
o Let the server default to $INFORMIXSERVER and have that set to the
remote and connect to the databasename alone?
o Read the server from $INFORMIXSERVER, the commandline, or some other
source and combine it in source with the databasename in a DATABASE
CONECT statement?
o Do you do as above but connect to the server alone with CONNECT then
execute a DATABASE statement?
Please post the code snips that show this. It is probably something
trivial like a missing at (@) sign or something.
Art S. Kagel
Chetan Anand wrote:
>
> Hi:
>
> Hi
>
> I have a question, if isql and dbaccess can connect to remote dbserver (
> xxx_svr )
> from command line, why 4gl runtime keeps flashing me following message
>
> Attempt to connect to database server (xxx_svr, conerr=-25555, oserr=0)
> failed.
>
> I have checked through all services, sqlhosts, .rhosts everything looks
> okay as I mentioned isql/dbaccess works fine on the remote server and I
> managed to put in couple of select statements which returns perfectly
> normal.
>
> Local Informix ver : Informix Dynamic Server 2000 Version 9.20.H
> Remote Informix ver : INFORMIX-Universal Server Version 9.14.UC5
> Local Host : HP UX B.11.00
> Remote Host : HP UX B.10.20
>
> Any clues
>
> Thanks in advance for any help in the matter
>
> Rgds
Thanks Art, Alnis
I checked thruough INFORMIXSERVER, INFORMIXDIR, ONCONFIG
Looks okay.
Here is the info for any clue
# --- 4gl code
database exb_canand@i920_shm
main
define li_count integer
select count(*) into li_count from dhl_intra@dhl_intraTCP:my_table
display "Total Records : ", li_count
end main
/* Env Variables */
$ echo $INFORMIXDIR
/opt/informix/ifmx_920
$ echo $INFORMIXSERVER
i920_shm
$ echo $ONCONFIGonconfig.i920
$ more $INFORMIXDIR/etc/sqlhosts
# -- sqlhosts
i920_shm onipcshm lhost i920_shm
dhl_intraTCP onsoctcp rhost 1900
$ grep 1900 /etc/servicesdhl_intraTCP 1900/tcp
This is the error message
SQL statement error number -908.
Attempt to connect to database server (dhl_intratcp, conerr=-25555,
oserr=0) failed.
Does it matter if server name is defined as combination of lower/upper case.
Any clue.
Thanks for any help on the problem.
Rds
"Art S. Kagel" wrote:
> How are you specifying and using the remote hostname in the 4GL server?
> Do you:
>
> o Let the server default to $INFORMIXSERVER and have that set to the
> remote and connect to the databasename alone?
> o Read the server from $INFORMIXSERVER, the commandline, or some other
> source and combine it in source with the databasename in a DATABASE
> CONECT statement?
> o Do you do as above but connect to the server alone with CONNECT then
> execute a DATABASE statement?
>
> Please post the code snips that show this. It is probably something
> trivial like a missing at (@) sign or something.
>
> Art S. Kagel
>
> Chetan Anand wrote:
> >
> > Hi:
> >
> > Hi
> >
> > I have a question, if isql and dbaccess can connect to remote dbserver (
> > xxx_svr )
> > from command line, why 4gl runtime keeps flashing me following message
> >
> > Attempt to connect to database server (xxx_svr, conerr=-25555, oserr=0)
> > failed.
> >
> > I have checked through all services, sqlhosts, .rhosts everything looks
> > okay as I mentioned isql/dbaccess works fine on the remote server and I
> > managed to put in couple of select statements which returns perfectly
> > normal.
> >
> > Local Informix ver : Informix Dynamic Server 2000 Version 9.20.H
> > Remote Informix ver : INFORMIX-Universal Server Version 9.14.UC5
> > Local Host : HP UX B.11.00
> > Remote Host : HP UX B.10.20
> >
> > Any clues
> >
> > Thanks in advance for any help in the matter
> >
> > Rgds
Chetan Anand wrote:
>
> Thanks Art, Alnis
>
> I checked thruough INFORMIXSERVER, INFORMIXDIR, ONCONFIG
> Looks okay.
>
> Here is the info for any clue
>
> # --- 4gl code
>
> database exb_canand@i920_shm
>
> main
>
> define li_count integer
>
> select count(*) into li_count from dhl_intra@dhl_intraTCP:my_table
> display "Total Records : ", li_count>
> end main
>
> /* Env Variables */
>
> $ echo $INFORMIXDIR
> /opt/informix/ifmx_920
> $ echo $INFORMIXSERVER
> i920_shm
> $ echo $ONCONFIG> onconfig.i920
>
> $ more $INFORMIXDIR/etc/sqlhosts>
> # -- sqlhosts
> i920_shm onipcshm lhost i920_shm
> dhl_intraTCP onsoctcp rhost 1900>
> $ grep 1900 /etc/services> dhl_intraTCP 1900/tcp
>
> This is the error message
>
> SQL statement error number -908.
> Attempt to connect to database server (dhl_intratcp, conerr=-25555,
> oserr=0) failed.
>
> Does it matter if server name is defined as combination of lower/upper case.
Bingo! Yes, Informix maps ALL identifiers (server, database, table,
columns, users, etc) to lower case. To access a server name that is
upper or mixed case you would have to use quotes, however this is not
an option for a servername in a remote query. You will just have to
change the sqlhosts file to just use lower case for the servername.
Told you it was something trivial.
Art S. Kagel
> Any clue.
>
> Thanks for any help on the problem.
>
> Rds
>
> "Art S. Kagel" wrote:
>
> > How are you specifying and using the remote hostname in the 4GL server?
> > Do you:
> >
> > o Let the server default to $INFORMIXSERVER and have that set to the
> > remote and connect to the databasename alone?
> > o Read the server from $INFORMIXSERVER, the commandline, or some other
> > source and combine it in source with the databasename in a DATABASE
> > CONECT statement?
> > o Do you do as above but connect to the server alone with CONNECT then
> > execute a DATABASE statement?
> >
> > Please post the code snips that show this. It is probably something
> > trivial like a missing at (@) sign or something.
> >
> > Art S. Kagel
> >
> > Chetan Anand wrote:
> > >
> > > Hi:
> > >
> > > Hi
> > >
> > > I have a question, if isql and dbaccess can connect to remote dbserver (
> > > xxx_svr )
> > > from command line, why 4gl runtime keeps flashing me following message
> > >
> > > Attempt to connect to database server (xxx_svr, conerr=-25555, oserr=0)
> > > failed.
> > >
> > > I have checked through all services, sqlhosts, .rhosts everything looks
> > > okay as I mentioned isql/dbaccess works fine on the remote server and I
> > > managed to put in couple of select statements which returns perfectly
> > > normal.
> > >
> > > Local Informix ver : Informix Dynamic Server 2000 Version 9.20.H
> > > Remote Informix ver : INFORMIX-Universal Server Version 9.14.UC5
> > > Local Host : HP UX B.11.00
> > > Remote Host : HP UX B.10.20
> > >
> > > Any clues
> > >
> > > Thanks in advance for any help in the matter
> > >
> > > Rgds
Thanks Art for the help, I was really in a loop.
Gosh, it worked when I put server name in all lower case. Is it documented
anywhere. Does that mean 4gl libraries translate remote server in all lower case ?
Rgds
"Art S. Kagel" wrote:
> Chetan Anand wrote:
> >
> > Thanks Art, Alnis
> >
> > I checked thruough INFORMIXSERVER, INFORMIXDIR, ONCONFIG
> > Looks okay.
> >
> > Here is the info for any clue
> >
> > # --- 4gl code
> >
> > database exb_canand@i920_shm
> >
> > main
> >
> > define li_count integer
> >
> > select count(*) into li_count from dhl_intra@dhl_intraTCP:my_table
> > display "Total Records : ", li_count> >
> > end main
> >
> > /* Env Variables */
> >
> > $ echo $INFORMIXDIR
> > /opt/informix/ifmx_920
> > $ echo $INFORMIXSERVER
> > i920_shm
> > $ echo $ONCONFIG> > onconfig.i920
> >
> > $ more $INFORMIXDIR/etc/sqlhosts> >
> > # -- sqlhosts
> > i920_shm onipcshm lhost i920_shm
> > dhl_intraTCP onsoctcp rhost 1900> >
> > $ grep 1900 /etc/services> > dhl_intraTCP 1900/tcp
> >
> > This is the error message
> >
> > SQL statement error number -908.
> > Attempt to connect to database server (dhl_intratcp, conerr=-25555,
> > oserr=0) failed.
> >
> > Does it matter if server name is defined as combination of lower/upper case.
>
> Bingo! Yes, Informix maps ALL identifiers (server, database, table,
> columns, users, etc) to lower case. To access a server name that is
> upper or mixed case you would have to use quotes, however this is not
> an option for a servername in a remote query. You will just have to
> change the sqlhosts file to just use lower case for the servername.
>
> Told you it was something trivial.
>
> Art S. Kagel
>
> > Any clue.
> >
> > Thanks for any help on the problem.
> >
> > Rds
> >
> > "Art S. Kagel" wrote:
> >
> > > How are you specifying and using the remote hostname in the 4GL server?
> > > Do you:
> > >
> > > o Let the server default to $INFORMIXSERVER and have that set to the
> > > remote and connect to the databasename alone?
> > > o Read the server from $INFORMIXSERVER, the commandline, or some other
> > > source and combine it in source with the databasename in a DATABASE
> > > CONECT statement?
> > > o Do you do as above but connect to the server alone with CONNECT then
> > > execute a DATABASE statement?
> > >
> > > Please post the code snips that show this. It is probably something
> > > trivial like a missing at (@) sign or something.
> > >
> > > Art S. Kagel
> > >
> > > Chetan Anand wrote:
> > > >
> > > > Hi:
> > > >
> > > > Hi
> > > >
> > > > I have a question, if isql and dbaccess can connect to remote dbserver (
> > > > xxx_svr )
> > > > from command line, why 4gl runtime keeps flashing me following message
> > > >
> > > > Attempt to connect to database server (xxx_svr, conerr=-25555, oserr=0)
> > > > failed.
> > > >
> > > > I have checked through all services, sqlhosts, .rhosts everything looks
> > > > okay as I mentioned isql/dbaccess works fine on the remote server and I
> > > > managed to put in couple of select statements which returns perfectly
> > > > normal.
> > > >
> > > > Local Informix ver : Informix Dynamic Server 2000 Version 9.20.H
> > > > Remote Informix ver : INFORMIX-Universal Server Version 9.14.UC5
> > > > Local Host : HP UX B.11.00
> > > > Remote Host : HP UX B.10.20
> > > >
> > > > Any clues
> > > >
> > > > Thanks in advance for any help in the matter
> > > >
> > > > Rgds
In article <381F6C8C.19CB7A@systems.dhl.com>, canand@systems.dhl.com (Chetan Anand) wrote: > Thanks Art for the help, I was really in a loop. > > Gosh, it worked when I put server name in all lower case. Is it > documented > anywhere. Does that mean 4gl libraries translate remote server in all > lower case ? > > Rgds > > Don't know if it's documented anywhere - it probably is - Unix is just lower case Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.com/informix