Connect to a external DB2 with ZendServer

171 Views Asked by At

I have been fighting with Zend Server 2018 while trying to connect to a remote AS/400 DB2.

I am using the IBM_DB2 php functions to do the connection but every time I get

[IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031

Anyone else successful connecting the two?

What I've read online is that I need to catalog the servers. So I have db2 running on an iseries at say 192.168.50.1 with a name of X232321 and a Windows 10 box running zend server 2018. What commands would I need to catalog the two servers so I can use the db2 connector? And what does that actually do?

Thanks for the help

1

There are 1 best solutions below

2
Mark Barinstein On

Try this on the windows db2 client:

db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
db2 "catalog db MY_ALIAS at node MY_IS"
db2 "catalog dcs db MY_ALIAS as X232321"

You can set MY_IS, MY_ALIAS as you want (no more than 8 letters). Port 446 may be different for your iSeries host.