从 .NET Core 连接到 iSeries 时遇到问题 [英] Having trouble connecting to iSeries from .NET Core

查看:39
本文介绍了从 .NET Core 连接到 iSeries 时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 IBM 论坛上与此交叉发布:https://www.ibm.com/mysupport/s/forumsquestion?id=0D50z00006egDnsCAE.位于此处的后续问题:从 .NET Core 连接到 iSeries 时遇到问题

Cross-posting with this on the IBM forums: https://www.ibm.com/mysupport/s/forumsquestion?id=0D50z00006egDnsCAE. Follow-up question located here: Having trouble connecting to iSeries from .NET Core

大家好,

我对这一切都很陌生,所以如果有任何我没有提供的信息有帮助,请告诉我.

I'm very new to this whole thing, so let me know if there's any info which would help, that I'm not providing.

目前我只是想让最基本的工作 - 打开连接.我有一个精简的 .NET Core 项目,它只是公开一个按钮,我可以按下该按钮打开 DB2 的连接.我的代码如下:

At the moment I'm just trying to get the very basics working - getting the connection to open. I have a stripped-down .NET Core project, which is simply exposing a button I can press that opens a connection for DB2. My code is as follows:

using IBM.Data.DB2.Core; 
... 
DB2Connection DB2Connection = new DB2Connection(connectionString); 
DB2Connection.SystemNaming = true; 
DB2Connection.Open();

我的连接字符串如下:

"Server=###.###.###.###;Database=AAAA;UID=BBBB;PWD=CCCC;LibraryList=DDDD,EEEE;"

我收到以下异常:

IBM.Data.DB2.Core.DB2Exception (0x80004005): 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: "###.###.###.###". Communication function detecting the error: "connect". Protocol specific error code(s): "10061", "*", "*". SQLSTATE=08001

我真的不知道如何从这里开始.对于上下文 - 我正在使用IBM Navigator for i";直接查询信息,这对我上面使用的 IP、用户 ID 和密码很有效.

I really don't know how to proceed from here. For context - I'm using "IBM Navigator for i" to query the info directly, and that works just fine for the IP, User ID, and Password I used above.

我已经阅读了一些资料,并尝试了一些不同的解决方案,但没有一个真正有帮助.我确实在将 DB2 Universal Universal Database for iSeries 与 for iSeries 与 Microsoft ADO .NET 集成"中看到,它建议查看导航器的工作管理部分,并在服务器作业下检查是否有任何添加的信息 -然而,似乎没有什么可看的.

I've done some reading up, and attempted a few different solutions, but none really helped. I did see that in "Integrating DB2 Universal Universal Database for iSeries with for iSeries with Microsoft ADO .NET", it suggested looking in the Work Management section of the navigator, and check under Server Jobs to see whether there was any added info - however, it does not appear there is anything there to see.

我明白我可能需要许可证才能使此连接正常工作,并接受如果这最终成为问题,我需要获得许可证 - 但我认为我没有达到阶段.现在我只想确保连接本身正常工作.

I do understand that I may require a license for this connection to work properly, and accept that if that ends up being the problem, I'll need to get the license - but I don't think I've reached that stage yet. For now I just want to make sure the connection itself works properly.

非常感谢任何帮助或见解.谢谢.

Any help or insights are greatly appreciated. Thank you.

推荐答案

SQL30081N 与 10061 的症状已通过包含 PORT=xxx; 解决;在连接字符串中,其中 xxx 是 Db2-for-i-series 正在侦听连接的正确 TCP/IP 端口号.

The symptom SQL30081N with 10061 was resolved by including the PORT=xxx; in the connection string, where xxx is the correct TCP/IP port number on which the Db2-for-i-series is listening for connections.

这篇关于从 .NET Core 连接到 iSeries 时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆