If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > connect db2 with RAD or eclipse

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-09, 03:11
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
connect db2 with RAD or eclipse

I can connect database with db2cc and can create table and something else. But I couldnt connect db2 from rational application developer. I use db2 v9.5 and rad v7.5 and linux. Error message is:
ERRORCODE=-4499, SQLSTATE=08001 java.net.ConnectException.

I think problem is about port and it says that error trying to open 50000 port.

But I dont know how to set tcp/ip.
Reply With Quote
  #2 (permalink)  
Old 03-04-09, 07:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Where is the DB2 server and where is RAD or Eclipse? Which jdbc driver are you using?

Andy
Reply With Quote
  #3 (permalink)  
Old 03-04-09, 14:10
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
DB2 is in /opt/ibm/db2, and RAD is in /opt/IBM/SDPShared.
They are in different directory as you can see.

I use com.ibm.db2.jdbc.app.DB2Driver
Reply With Quote
  #4 (permalink)  
Old 03-04-09, 14:28
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
is this driver right for 50000 port. Do I have to use com.ibm.db2.jcc.db2driver
Reply With Quote
  #5 (permalink)  
Old 03-04-09, 14:46
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Type 2 and 3 drivers ("app" and "net") are deprecated and may not even be supported by DB2 9.5

I would use the type 4 (jcc) driver.
Reply With Quote
  #6 (permalink)  
Old 03-04-09, 18:43
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
I got same message
ERRORCODE=-4499, SQLSTATE=08001 java.net.ConnectException.
And says that openning port 50000 cannot be done.
There is a problem about port 50000.
Reply With Quote
  #7 (permalink)  
Old 03-04-09, 19:12
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
when I type db2start:
SQL5043N Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.
This appears.
Reply With Quote
  #8 (permalink)  
Old 03-04-09, 20:21
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
db2 get dbm cfg | grep SVCE
grep -i db2 /etc/services
db2set -all
Reply With Quote
  #9 (permalink)  
Old 03-05-09, 08:33
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Also check you db2nodes.cfg file.

Andy
Reply With Quote
  #10 (permalink)  
Old 03-06-09, 13:07
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
db2inst1@gokhan-pardus gokhan $ grep -i db2 /etc/services
ibm-db2 523/tcp # IBM-DB2
ibm-db2 523/udp # IBM-DB2
questdb2-lnchr 5677/tcp # Quest Central DB2 Launchr
questdb2-lnchr 5677/udp # Quest Central DB2 Launchr
questdb2-lnchr 5677/udp # Quest Central DB2 Launchr
questdb2-lnchr 5677/udp # Quest Central DB2 Launchr
db2c_db2inst2 50002/tcp
db2c_db2inst1 50000/tcp
db2c_db2inst3 50003/tcp
db2c_db2inst4 50001/tcp
db2inst1@gokhan-pardus gokhan $ db2set -all
[i] DB2PROCESSORS=0
[i] DB2COMM=TCPIP
[i] DB2CODEPAGE=1208
[g] DB2SYSTEM=gokhan-pardus
[g] DB2INSTDEF=db2inst1
[g] DB2ADMINSERVER=dasusr1


I did what you sad but nothing changed and where is db2nodes.cfg I couldnt find.
Reply With Quote
  #11 (permalink)  
Old 03-06-09, 13:19
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
db2nodes.cfg is in <INSTHOME>/sqllib.

Your etc/services does not look like mine, but I have just 1 instance.

I have:

DB2_db2inst1 60000/tcp
DB2_db2inst1_1 60001/tcp
DB2_db2inst1_2 60002/tcp
DB2_db2inst1_END 60003/tcp
db2c_db2inst1 55000/tcp

Andy
Reply With Quote
  #12 (permalink)  
Old 03-06-09, 13:19
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
Those instances are which I created then deleted . Now I have only one instance
Reply With Quote
  #13 (permalink)  
Old 03-06-09, 13:20
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by fourthedition


I did what you sad but nothing changed and where is db2nodes.cfg I couldnt find.
You forgot this:

db2 get dbm cfg | grep SVCE
Reply With Quote
  #14 (permalink)  
Old 03-09-09, 13:50
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
db2 get dbm cfg | grep SVCE

TCP/IP Service name (SVCENAME) = localhost
Reply With Quote
  #15 (permalink)  
Old 03-09-09, 15:51
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
There you go. SVCENAME should match the name of the entry in /etc/services. Don't forget to restart the instance after you change it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On