Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem - db2 database configuration in datasource

 
uma mahesh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
database name url for oracle to connect remote database is
jdbc racle:thin:@hostName ort:serviceId
for db2 how to connect to remote database....
jdbc b2:-----------------
what we have to give...
 
Jacqueline Qin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if I am not wrong, you just need to put jdbc b2 bname where dbname is your database name. You also need to create this connection in your DB2 Control Center. Go to your Control Center, expand to the databases node and right-click. Select "Add" and select the database.
 
uma mahesh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are telling to add alias name in the control center and use it... but i dont want to create alias for my remote database. My aim is to remove hard coding.
I can connect to remote database by alias and give that name in connecting database. but the problem is if i shifted my application to client side again i have to configure alias for that i have to give user and password.
I want to eliminate entire thing and connect db2 using ip address. not through aliases..
could you please help me in this regards
just like in oracle
by ip and port of remote machine...
 
Subhash Reddy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the properties , add the below properties and try :
serverName <your remote server IP address>
libraries <your library name>
Use the new jt400 driver.
 
Subhash Reddy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Data Source properties , add the below properties and try :
serverName "your remote server IP address"
libraries "your library name"
Use the new jt400 driver.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic