You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用IfxPy连接Avaya CMS Informix数据库时用户ID带主机名报错

Troubleshooting IfxPy Connection Error (-951) with Avaya CMS Informix Database

I’ve run into similar connection headaches with Avaya CMS’s Informix backend before, so here are some targeted fixes and troubleshooting steps to try out:

1. Adjust Connection String User Identifier

The HCL ONEDB ODBC Driver has a known quirk where it automatically appends the client hostname to the username. Try these quick tweaks:

  • Replace UID=myuser with USER=myuser in your connection string—some Informix drivers prioritize the USER parameter over UID and skip adding the hostname suffix.
  • Wrap the username in single quotes: UID='myuser'—this forces the driver to treat the username as a literal instead of modifying it.

2. Switch to IBM Informix Client SDK (Your Proposed Fix, With Practical Details)

HCL’s ONEDB driver doesn’t always play nicely with Avaya’s customized Informix setup. Here’s how to make the switch smoothly:

  • Uninstall the current HCL ONEDB ODBC Driver and IfxPy completely to avoid conflicts.
  • Install the correct bit-version of IBM Informix Client SDK: Most Avaya CMS deployments use 32-bit Informix even on 64-bit Windows, so go for the 32-bit SDK unless you’ve confirmed your CMS uses 64-bit.
  • Reinstall IfxPy matching the SDK’s bitness (e.g., run pip install IfxPy --platform win32 if you installed the 32-bit SDK).
  • Configure INFORMIXDIR to point to the SDK’s install path (like C:\Program Files (x86)\IBM\Informix Client SDK), then set up an ODBC DSN using the IBM Informix ODBC Driver (not HCL’s) to test connectivity first. If the ODBC test works with just myuser as the username, your Python connection should follow suit.

3. Verify Server-Side User & Configuration

Even with permissions granted, double-check these settings with your Avaya team:

  • Confirm the sysusers table in the cms database contains the user myuser (without the @myserver suffix). Informix won’t recognize the suffixed username if the account was created without it.
  • Ensure the sqlhosts file on the Informix server has the correct entry for cms_net:
    cms_net olsoctcp 10.10.10.10 50001
    
  • Ask the team to check if the server’s authentication mode allows non-suffixed logins—Avaya CMS sometimes restricts this, so they may need to adjust AUTHENTICATION settings in the onconfig file.

4. Try Alternative Connection Syntax in Python

Instead of using a single connection string, pass parameters as a dictionary to IfxPy.connect()—this avoids potential parsing issues in the driver:

import os
if 'INFORMIXDIR' in os.environ:
    os.add_dll_directory(os.path.join(os.environ['INFORMIXDIR'], "bin"))
import IfxPy

conn_params = {
    "SERVER": "cms_net",
    "HOST": "10.10.10.10",
    "SERVICE": "50001",
    "PROTOCOL": "olsoctcp",
    "CLIENT_LOCALE": "en_US.UTF8"
}

conn = IfxPy.connect("cms", "myuser", "mypassw", conn_params)
IfxPy.close(conn)

Bonus Troubleshooting Step

Test connectivity directly via ODBC first to isolate the issue:

  • Open the correct ODBC Data Source Administrator: Use C:\Windows\System32\odbcad32.exe for 64-bit drivers, C:\Windows\SysWOW64\odbcad32.exe for 32-bit.
  • Create a System DSN pointing to your CMS Informix server, use myuser as the username, and test the connection.
    • If the ODBC test fails with the same -951 error, the problem is with driver/server configuration, not Python.
    • If the ODBC test succeeds, the issue lies in how IfxPy is interacting with the driver—stick with the IBM SDK and alternative connection syntax.

内容的提问来源于stack exchange,提问作者bracko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 11:35:30