Solved

jdbc connection to as400

Posted on 2011-03-04
5
879 Views
Last Modified: 2012-05-11
I am doing db2 everyplace  parallel migration.  It uses jdbc (I am new to how jdbc drivers work).
This is a clean database and I am migrating the information for one machine to another.  The xml script is adding the data.

I run the xml script with (jdbc:db2:my400)

results:  could not connect to source database jdbc:db2:my400.

How does jdbc know what ipaddress to go to?
0
Comment
Question by:cw50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 334 total points
ID: 35039003
try

jdbc:db2://<HOST>:<PORT>/<DB>
0
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 166 total points
ID: 35039035
Hi cw50,

Several things have to work together for this type of connection to succeed.

The xml describes the connection as jdbc:db2:my400.  It's a jdbc connection to a db2 database named my400.

The DB2 server must have a database named my400 (probably the alias name), accept TCP/IP connections, and discovery must be turned on.  You can check discovery by entering:

  db2 get dbm cfg

at the command line.  The check for these three lines:

 TCP/IP Service name                          (SVCENAME) = db2c_DB2
 Discovery mode                               (DISCOVER) = SEARCH
 Discover server instance                (DISCOVER_INST) = ENABLE

Also do a:

  db2 list database directory.  my400 MUST be one of the listed databases.



Kent
0
 

Author Comment

by:cw50
ID: 35039108
Do I have to have a catalog node and database to run jdbc?
0
 

Author Comment

by:cw50
ID: 35039133
Does jdbc use dns?  If so can I put the ipaddress and my400 name in the host file?
0
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 334 total points
ID: 35041419
you don't have to catalog
you can connect by using a type 4 connection string
this way the universal driver will connect to a remote db2 without the need to catalog it
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question