0 / 0
Go back to the English version of the documentation
common core services故障排除
Last updated: 2024年11月22日
common core services故障排除

使用这些解决方案来解决您在连接时可能遇到的问题。

IBM Db2 for z/OS:尝试连接到Db2 for z/OS服务器时检索模式列表出错

测试与Db2 for z/OS服务器的连接时,如果连接无法检索模式列表,可能会收到以下错误:

CDICC7002E: The assets request failed: CDICO2064E: The metadata for the column TABLE_SCHEM could not
 be obtained: Sql error: [jcc][10150] [10300][4.28.11] Invalid parameter: Unknown column name
 TABLE_SCHEM. ERRORCODE=-4460, SQLSTATE=null

解决问题

在Db2 for z/OS服务器上,将DESCSTAT子系统参数设置为 "No。 更多信息,请参阅 "STATIC 字段描述"(DESCSTAT 子系统参数)

无法运行已废弃功能的生成代码为Informix连接加载数据

您收到"DatabaseError:在 sql 上执行失败:... 当使用已过时的功能从Informix数据库加载数据时,运行生成的代码,并尝试查询名称为大写的表时,出现 "unable to rollback"(无法回滚)。

原因

Informix数据库配置为区分大小写的标识符,您需要更新生成的代码。

解决问题

如果可以,请改用Flight service生成的代码从Informix连接加载数据。 如果想继续使用已废弃功能生成的代码,则需要对生成的代码进行如下编辑:

  • 对于Python,在连接中添加连接属性 "'DELIMIDENT=Y',并用双引号("")包围大写标识符。替换以下几行

    Informix_connection = jaydebeapi.connect('com.informix.jdbc.IfxDriver',
    '{}://{}:{}/{}:user={};password={};'.format('jdbc:informix-sqli',
    Informix_metadata['host'],
    Informix_metadata['port'],
    Informix_metadata['database'],
    Informix_metadata['username'],
    Informix_metadata['password']),
    [Informix_metadata['username'],
    Informix_metadata['password']])
    
    query = 'SELECT * FROM informix.FVT_EMPLOYEE'
    

    与:

    Informix_connection = jaydebeapi.connect('com.informix.jdbc.IfxDriver',
    '{}://{}:{}/{}:user={};password={};DELIMIDENT=Y;'.format('jdbc:informix-sqli',
    Informix_metadata['host'],
    Informix_metadata['port'],
    Informix_metadata['database'],
    Informix_metadata['username'],
    Informix_metadata['password']),
    [Informix_metadata['username'],
    Informix_metadata['password']])
    
    query = 'SELECT * FROM informix."FVT_EMPLOYEE"'
    
  • 对于使用Python 的 Spark,请替换为

    data_df_0 = sparkSession.read.format('jdbc') \
      .option('url', 'jdbc:informix-sqli://{}:{}/{}'.format(Informix_metadata['host'],Informix_metadata['port'],Informix_metadata['database'])) \
      .option('dbtable', 'informix.FVT_EMPLOYEE') \
      .option('user', Informix_metadata['username']) \
      .option('password', Informix_metadata['password']).load()
    data_df_0.show(5)
    

    与:

    data_df_0 = sparkSession.read.format('jdbc') \
      .option('url', 'jdbc:informix-sqli://{}:{}/{}'.format(Informix_metadata['host'],Informix_metadata['port'],Informix_metadata['database'])) \
      .option('dbtable', 'informix."FVT_EMPLOYEE"') \
      .option('DELIMIDENT', 'Y') \
      .option('user', Informix_metadata['username']) \
      .option('password', Informix_metadata['password']).load()
    data_df_0.show(5)
    
  • 对于 R,在连接中添加连接属性 "'DELIMIDENT=Y',并用双引号("")包围所有大写名称。替换以下行:

    paste("jdbc:informix-sqli://", Informix_credentials[][["host"]], ":", Informix_credentials[][["port"]],
    "/", Informix_credentials[][["database"]],
    ":user=", Informix_credentials[][["username"]],
    ";password=", Informix_credentials[][["password"]], ";", sep=""),
    ...
    query <- "SELECT * FROM myschema.MY_TABLE"
    

    与:

    paste("jdbc:informix-sqli://", Informix_credentials[][["host"]], ":", Informix_credentials[][["port"]],
    "/", Informix_credentials[][["database"]],
    ":user=", Informix_credentials[][["username"]],
    ";password=", Informix_credentials[][["password"]],";DELIMIDENT=Y", ";", sep=""),
    ...
    query <- "SELECT * FROM myschema.\"MY_TABLE\""
    

父主题: 排除Cloud Pak for Data中的问题

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more