Closed imamong closed 5 years ago
You can't have two entries with the same name in the sqlhosts file. You will have to include all the connection information in the connection string.
informix@irk:/opt/informix/IBM/OpenInformix/IfxPy/IfxPy/Examples$ grep onsoc s.py
ConStr = "SERVER=irk1210;DATABASE=stores7;HOST=127.0.0.1;SERVICE=9088;PROTOCOL=onsoctcp;UID=informix;PWD=xxxxx;"
informix@irk:/opt/informix/IBM/OpenInformix/IfxPy/IfxPy/Examples$
Add "PROTOCOL=onsoctcp" to your connection string, it should allow you to connect even if there is no trace "sop_tcp" in your sqlhosts file (or there is no sqlhosts at all)
@jsagrera : Thanks.
add 'PROTOCOL=onsoctcp;' to constr.
two informix server has same DBSERVERNAME. how to use?
constr HOST is not working。
sqlhosts: