首页 > 解决方案 > DB2 error: SQL10007N Message "-1390" could not be retrieved. Reason code: "3"

问题描述

I get the following error when trying to connect to a db2 db:

$ /opt/ibm/db2/V10.5/bin/db2 connect to SRVO
SQL10007N Message "-1390" could not be retrieved.  Reason code: "3".

However I don't experience any problems when connecting to it from DBeaver. What could be the cause of the error?

标签: db2dbeaver

解决方案


The message says:

SQL1390C The environment variable DB2INSTANCE is not defined or is invalid.

and the SQL10007 is also returned because of this - so fix the DB2INSTANCE by setting it to your current instance.

set  DB2INSTANCE=whateveryourinstanceis

Addition: Your driver seetting within DBeaver should point to the correct location of following files: db2java.zip db2jcc_license_cu.jar (or similar) db2jcc4.jar


推荐阅读