PHP connecting to IBM DB2 failed because of licensing (SQLSTATE=42968)

烈酒焚心 提交于 2020-01-17 07:48:22

问题


Good day everyone! I need to get info from stored procedures in IBM DB2 database on remote server. I've downloaded to my centOs 7.3 (with php7.1.8) drivers ibm_data_server_driver_for_odbc_cli.tar.gz and compiled ibm_db2.so and pdo_ibm.so

php -m and phpinfo() shows that modules installed

$db = new PDO("ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=testdb;" .
  "HOSTNAME=11.22.33.444;PORT=56789;PROTOCOL=TCPIP;", "testuser", "tespass");

If using wrong password - got this: "SQLSTATE=08001, SQLDriverConnect: -30082. Security processing failed with reason 15"

If useing right password - got this: "Uncaught PDOException: SQLSTATE=42968, SQLDriverConnect: - 1598 [IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968 in..."

So I think that my app got connection to base (wrong/right pass show this) and something wrong with IBM drivers.

What about this license? I must buy IBM drivers to connect to DB2?

Or maybe I need install something else?

___UPD1:

Ok. I've installed DB2 Connect v10.5 and activate license:

This product is now licensed for use as outlined in your License Agreement.

But still got this error. Then I recompile PHP drivers with new path to installed DB2 Client. And still nothing new.

In official documentation written that I got NO license installed (or present on mine computer. Also remote DB2 server, that I wanna to connect, got installed z/OS). Why this happens?

来源:https://stackoverflow.com/questions/45955410/php-connecting-to-ibm-db2-failed-because-of-licensing-sqlstate-42968

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!