ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Connecting to DB2 9.7 from MB6.1 JavaCompute node

Post new topic  Reply to topic
 Connecting to DB2 9.7 from MB6.1 JavaCompute node « View previous topic :: View next topic » 
Author Message
Karan
PostPosted: Tue May 29, 2012 9:23 am    Post subject: Connecting to DB2 9.7 from MB6.1 JavaCompute node Reply with quote

Apprentice

Joined: 21 Oct 2009
Posts: 29

Hi,

Can we use Type 4 Jdbc driver/connection to connect to a DB2 v9.7 (remote)Database from MBv6.1 Java Compute. (AIX)
(Client Drivers as provided by DB2 v9.7 Server installable - installed on the broker machine/server. Both client m/c ie MB and db2 server m/c have DB2 v9.7)

Have some doubts regarding compatibility.

Also do we need to close Statement and ResultSet objects or is that handled by Broker. (Documentation says no need to close Connection objects)
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 29, 2012 9:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can't use JDBC drivers that require levels of Java that are not supported on the version of Broker you're running.

There's no particular reason you should be using JDBC to talk to DB2 from broker. You should be able to use a compatible level of DB2Connect on the Broker machine to connect to DB2 at a higher level using ODBC.
Back to top
View user's profile Send private message
Karan
PostPosted: Wed May 30, 2012 12:29 am    Post subject: Reply with quote

Apprentice

Joined: 21 Oct 2009
Posts: 29

Hi MqJeff,

I was referring to foll code in Javacompute

Connection conn=this.getJDBCType4Connection("NameOfConfigurableService",JDBC_TransactionType.MB_TRANSACTION_AUTO)
as stated in MB documentation for javacompute.

My doubt was regd DB2 version compatibility.

If not this then should I use
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver)
Connection conn=(dsn,id,pwd)
or maybe
Class.forName(com.ibm.db2.jcc.db2Driver)
Connection conn=(db,id,pwd)
in javacompute

Or should we not try to connect to db2 v9.7 from JavaCompute in v6.1 ?(Dats what you meant i think when you said not to use jdbc)

When you said Odbc connection you meant from Compute node DSN ?
(db2 connect is to connect to mainframe db2 I guess , we have db2 on aix , so will not be using db2connect exactly, will use something else)
Does broker 6.1 support odbc conn to db2 v9.7. I think it is till 9.5 (or are higher versions implied)

I have tried to connect using method1 ie
Connection conn=this.getJDBCType4Connection("NameOfConfigurableService",JDBC_TransactionType.MB_TRANSACTION_AUTO)
Connection and a sample query execution was successful.
But is it unsafe to use it ?


Please could you give some suggestions
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 30, 2012 2:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I don't know what levels of DB2 are supported by Broker v6.1.

The System Requirements page is straight forward on this subject.

It's possible I used "db2connect" incorrectly, I meant in general using the DB2 client at a separate level from the db2 server.

My comment on level of Java had nothing to do with any of the java code you cited. It had to do with the fact that the DB2 JDBC drivers that come with DB2 9.7 may be compiled for Java 1.6, and your Broker v6.1 may only support jar files compiled against Java 1.4 or 1.5....

Yes, I meant 'a compute node DSN' when I said 'odbc'.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Connecting to DB2 9.7 from MB6.1 JavaCompute node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.