问题描述
我使用IBM.Data.DB2提供程序在.net c#中制作了一个小型桌面应用程序,它连接到z / OS上的IMB DB2。当我将这个应用程序部署在机器上时,我面临IBM DB Connect的运行时问题,所以我发现我不得不安装DB2 Run-Time Client Lite,我这样做。现在,当我运行应用程序时,会出现错误ERROR [42968] [IBM] SQL8002N Connect处理失败;找不到有效的产品许可证。SQLSTATE = 42968
I made a small desktop app in .net c# using IBM.Data.DB2 provider connecting to IMB DB2 on z/OS. When i deployed this app on a machine i faced issues for runtime for IBM DB Connect then i found that i had to install the DB2 Run-Time Client Lite and i did so. Now when i run the application an error is coming "ERROR[42968][IBM] SQL8002N Connect processing failed; a valid product license was not found. SQLSTATE=42968"
注意:我可以使用HIS库连接相同的数据库。
Note : I am able to connect same database using HIS libraries.
Regards
Verybiztalker
RegardsVerybiztalker
推荐答案
您将无法使用任何 lite 版本访问z / OS DB2远程入口点。使用IBM JDBC驱动程序,您需要企业版本才能连接到z / OS,这与C#几乎一模一样 - 这是为了保护大型机免受不受欢迎的各种各样的客户端企业神。
You will not be able to access z/OS DB2 remote entry points with any lite version. With the IBM JDBC drivers, you need the enterprise version to connect to z/OS and this is almost certainly the same as with C# - this is to keep the mainframe protected from all-and-sundry clients that don't have the blessing of the 'enterprise gods'.
如果您没有有效的许可证,客户端甚至不会尝试连接到大型机。您收到的错误代码和状态完全符合我所描述的情况。
If you don't have a valid license, the client won't even attempt to connect to the mainframe. The error code and state you're receiving match exactly the situation I describe.
IBM保护(或更准确地说,允许客户保护)他们的大型机DB2访问密切。我怀疑这与确保只有企业有福的应用程序甚至尝试连接有关。没有正确的许可证文件的JDBC客户端甚至没有将他们的请求显示在主机TCP端口,它们在客户端被阻止 - 主机通常是关键业务,大多数桌面/服务器应用程序梦想成为: - )。
IBM guard (or, more precisely, allows their customers to guard) their mainframe DB2 access very closely. I suspect this has something to do with ensuring only enterprise-blessed applications even try to connect. JDBC clients that don't have the right license file don't even get their requests appearing at the mainframe TCP ports, they're blocked on the client side - the mainframe is usually business-critical in a way most desktop/server applications only dream of becoming :-).
使用IBM JDBC驱动程序,使用单一的4型驱动程序来访问所有的 DB2平台(LUW ,iSeries,System z等),但是您实际上必须在特定平台的CLASSPATH中安装许可证文件,否则您将收到例外。
With the IBM JDBC drivers, a single type-4 driver is used to access all DB2 platforms (LUW, iSeries, System z, etc) but you actually have to have a license file installed in your CLASSPATH for the specific platforms or you'll get an exception.
此许可证文件的格式为db2jcc_cisuz.jar,其中,cisuz指定允许哪些平台被访问(cu是最常见的,但不能访问iSeries或System z)。
This license file is of the form "db2jcc_cisuz.jar" where the cisuz specifies which platforms are allowed to be accessed (cu is the most common but that doesn't give access to iSeries or System z).
您通常必须从IBM购买DB2 Connect以获取这些文件,我怀疑.NET框架将是类似的情况。您可能会发现DB2 Connect产品具有.NET客户端驱动程序以及JDBC(我还没有看到)。寻找该产品的企业版本,因为标准版本将不太可能拥有System z许可证。
You generally have to buy DB2 Connect from IBM to get these files and I suspect it would be a similar situation for the .NET framework. You may find that DB2 Connect products have .NET client drivers as well as JDBC (I haven't looked). Look for the "Enterprise" edition of that product since the standard ones would be unlikely to have the System z license.
这篇关于IBM.Data.DB2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!