adam japan
adam japan

Reputation: 51

AS/400 DDM service not running

I wanted to make a ODBC connection from Windows PC to AS/400 DB2 server and I wrote a VBA program. But I got the following error.

Remote port could not be resolved

Then, I checked the status of server with CWSPING and got the result below:

I - Verifying connection to system 192.168.1.2...
I - Successfully connected to server application: Central Client
I - Successfully connected to server application: Network File
I - Successfully connected to server application: Network Print
I - Successfully connected to server application: Data Access
I - Successfully connected to server application: Data Queues
I - Successfully connected to server application: Remote Command
I - Successfully connected to server application: Security
E - CWBCO1011 - Remote port could not be resolved
E - CWBCO1008 - Unable to connect to server application DDM, returned 8407
I - Successfully connected to server application: Telnet
W - CWBCO1015 - Connection verified to system 192.168.1.2, but there were warnings

This means DDM service is not working on the server. ODBC connection requires DRDA, which runs upon DDM service, so I think running DDM service is the key to make ODBC connection. So I tried STRTCPSVR *DDM command but got the result below

*DDM not valid for parameter SERVER

And also tried CHGDDMTCPA AUTOSTART(*YES) PWDRQD(*YES) command, but got an error and I got stuck.

Command CHGDDMTCPA in library *LIBL not found

Does anyone have an idea of enabling DDM server on AS400?

Upvotes: 1

Views: 1766

Answers (3)

adam japan
adam japan

Reputation: 51

Finally, I got connected by using JDBC. The summary of what I found is as follows:

  • ODBC seems using DRDA(port 446) but the server does not have DRDA/DDM service
  • OLEDB seems connecting Data Access(port 8471) but issued unknown error
  • JDBC also connection Data Access(port 8471) and it worked!

The first error I encountered when using ODBC is "Remote port could not be resolved". What happened behind this seems as follows:

  1. ODBC asked Server Mapper(port 449) to find DRDA port(it may change on a server)
  2. Server Mapper could not find DRDA port because the server has no DRDA service
  3. ODBC showed "port not resolved" error

Then, I tried OLEDB this time. It checked user/password correctly but issued unknown error. When I put incorrect password, it showed "password is incorrect", which means OLEDB successfully log on to the server but got some error after sign on.

The last, I used JDBC and successfully connected! Generally, the connection url is like "jdbc:as400://" but it showed error. Using trace of JDBC, it seems to have problem on sign on to the server. So I changed the url to "jdbc:as400://:8471", then I finally connected. Looking into trace, it directly access to port 8741 and send user/password and get connected. I don't know the detail, but it worked!

Appreciated for your help!

Upvotes: 0

PoC
PoC

Reputation: 591

Additionally to the answer from @jmarkmurphy:

  • You can easily check netstat *cnn for open ports.
  • There is actually a tcpsvr named *ddm but that isn't used with ODBC.
  • ODBC-Access only needs host server *database. There aren't any further requirements for host servers.
  • For checking which services are started at tcp startup time, use strfdu, option 5 with the file qusrsys/qatocstart. From there you can easily view and change what should be started and what not.

Upvotes: 0

jmarkmurphy
jmarkmurphy

Reputation: 11493

Try STRHOSTSVR *DATABASE.

STRHOSTSVR is used to start servers associated with IBM i Access and i Access Client Solutions.

STRTCPSVR is used, in general, to start servers associated with TCP/IP like FTP, Telnet, etc. Except the HTTP Server which is started via the Web Administration site at http://<server>:2001.

Upvotes: 1

Related Questions