Reputation: 51
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
Reputation: 51
Finally, I got connected by using JDBC. The summary of what I found is as follows:
The first error I encountered when using ODBC is "Remote port could not be resolved". What happened behind this seems as follows:
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
Reputation: 591
Additionally to the answer from @jmarkmurphy:
netstat *cnn
for open ports.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
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