Informix バージョン 11.x 以降では、DRDA プロトコルがサポートされるようになりました。
GeneXus .NET ジェネレーターを使用して Informix に接続する場合は、「
IBM Informix Developer's Handbook」の説明に従い、DRDA のサポートを有効にする必要があります。
Linux の場合の例を示します:
1. $INFORMIXSQLHOSTS (または $SQLHOSTS) 環境変数に指定されている sqlhosts ファイル (例:
/opt/informix/etc/sqlhosts) を編集し、DRDA (drsoctcp) の行を追加します:
#dbservername nettype hostname servicename options
informixfullgx onsoctcp 172.16.0.205 informix
informix_drda drsoctcp 172.16.0.205 informix_drda
2. etc ディレクトリーにある Informix サーバーの設定ファイルを編集し、新しいデータベース定義をエイリアスとして含めます。このファイルは、環境変数 $ONCONFIG を使用してアクセスできます ($INFORMIXDIR/etc/$ONCONFIG)。例:
/opt/informix/etc/onconfig:
DBSERVERNAME informixfullgx
DBSERVERALIASES informix_drda
3. /etc/services を編集し、ポートを指定します:
informix 9088/tcp # Informix server
informix_drda 9094/tcp # Informix server drda
4. 変更内容を有効にするために Informix サーバーを再起動します。データストアで [
Server TCP/IP Port ] プロパティに値 9094 を設定します。
注: アプリケーションで次のエラーがスローされた場合:
ERROR 08001 IBM SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP".Communication API being used: "SOCKETS".Location where the error was detected: "172.16.0.205".Communication function detecting the error: "connect".Protocol specific error code(s): "10060", "*", "*". SQLSTATE=08001
Linux のファイアウォールで、DRDA が使用するポートが許可されていることを確認します。この例では 9094 です。
ポート 9094 を許可するようファイアウォールを設定する例:
root@fullgxinformix12 # firewall-cmd --list-ports
9088/tcp
root@fullgxinformix12 # firewall-cmd --add-port 9094/tcp
success
root@fullgxinformix12 # firewall-cmd --list-ports
9088/tcp 9094/tcp
root@fullgxinformix12 # firewall-cmd --permanent --add-port 9088/tcp
Warning: ALREADY_ENABLED: 9088:tcp
success
root@fullgxinformix12 # systemctl stop firewalld
root@fullgxinformix12 # systemctl start firewalld
root@fullgxinformix12 # firewall-cmd --list-ports
9088/tcp 9094/tcp