Oracle 连接到 Informix 时丢失与远程代理的 RPC 连接错误

发布于 2024-07-24 05:49:00 字数 683 浏览 2 评论 0原文

我在使用简单的数据导入器/更新器时遇到问题,该数据导入器/更新器从 Informix 获取数据,将其插入到 Oracle 中的表中,并更新原始表中的标志。 设置是这样的

Pro*C program calls a PL/SQL procedure
The procedure 
  opens a cursor on Informix, 
  loops through each row
    insert the data into an oracle table
    commit
    update the "new data" flag in Informix (i.e. stop a re-import)
    commit

需要两次提交才能停止特定的 Oracle 错误(我忘记是哪一个,但这是因为正在更新的表位于两个数据库中,单个提交无法处理它)。 此代码适用于源表中的少量记录 (5-10),但当存在 > 条记录时就会失败。 1000. Oracle 日志目录中的警报日志显示错误“丢失与远程代理的 RPC 连接”。 Informix目录下没有对应的错误,所以怀疑驱动程序有问题。 我们在 Red hat 上使用 Oracle 10.2 和 unixODBC 驱动程序。

有谁对解决方法或如何解决它有任何想法? 似乎没有关于此错误消息的任何有用信息 - 大多数页面只是说“这不是 Oracle 问题”。

I am having a problem with a simple data importer / updater that takes data from Informix, inserts it into a table in Oracle, and updates a flag in the original table. The set up is this

Pro*C program calls a PL/SQL procedure
The procedure 
  opens a cursor on Informix, 
  loops through each row
    insert the data into an oracle table
    commit
    update the "new data" flag in Informix (i.e. stop a re-import)
    commit

The two commits are necessary to stop a particular Oracle error (I forget which one, but it is because the tables being updated are in two databases and a single commit can't handle it).
This code works fine for a small number of records (5-10) in the source table, but falls over when there are > 1000. The alert log in the Oracle log directory shows an error "Lost RPC connection to remote Agent". There is no corresponding error in the Informix directory, so I suspect the driver is at fault. We are using Oracle 10.2 with the unixODBC driver on Red hat.

Does anyone have any ideas for a workaround or indeed how to fix it? There does not seem to be any useful information about this error message - most pages just say something along the lines of "It's not an Oracle problem".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独自唱情﹋歌 2024-07-31 05:49:00

通常,COMMIT 会关闭打开的游标。 您可能需要将 Informix 上的游标设置为带有 HOLD 的游标(ESQL/C 术语 - 您必须转换为 ODBC)。 由于缓冲,您可能会得到一些行; 单个获取操作可能会从 Informix 收集多条(可能超过 10 条)记录,并且您只有在返回数据库获取更多记录时(游标关闭时)才会注意到问题。

我对这个解释不太满意; UPDATE 加 COMMIT 应该将游标标记为关闭。

假设您正在使用 Informix ODBC 驱动程序(而不是其他供应商的 Informix ODBC 驱动程序),那么您可以通过在程序启动之前在环境中设置 SQLIDEBUG=2:xyz 来对此进行调试。 这应该生成一个名称以“xyz_###”开头的文件,其中“###”是一系列数字,可能是十六进制数字。 然后该文件可以由 sqliprint 解释。 它将向您显示应用程序和 Informix 数据库服务器之间传送的信息,并且很可能向您显示通过线路发送的数据分组等。

Normally, a COMMIT closes open cursors. You might need to make the cursor on Informix a cursor WITH HOLD (ESQL/C jargon - you'd have to translate to ODBC). You might get a few rows working because of buffering; a single fetch operation might collect several (maybe more than 10) records from Informix, and you only notice the problem when it comes time to go back to the database for more - when the cursor is closed.

I'm not completely comfortable with this as an explanation; the UPDATE plus COMMIT should mark the cursor as closed.

Assuming you are using an Informix ODBC driver (as opposed to some other vendor's ODBC driver for Informix), then you might be able to debug this by setting SQLIDEBUG=2:xyz in the environment before the program starts. This should produce a file whose name starts 'xyz_###' where '###' is some series of digits, possibly hex digits. This file can then be interpreted by sqliprint. It will show you the information conveyed between your application and the Informix database server - and may well show you the grouping of data sent over the wire, etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文