Problem connecting to DB2 from Oracle App Server(Unix)


General J2EE: Problem connecting to DB2 from Oracle App Server(Unix)

  1. Hello Guys, I am into a weired situation. I am developing one application which needs to connect to DB2 on demand. Based on the user input, we execute a query on DB2 database. So all the developer's machines have System DSN for DB2 (I believe its an JDBC-ODBC). So during the development phase we used the local machines and using we were able to connect to DB2. Now we deployed our application to Oracle App Server which is a unix box (I found out that later). So obviously its going to fail the connection as Unix doesnt have ODBC-JDBC DataSource. So I searched for JDBC drivers and found out that DataDirect is the one who connects to DB2 as well. So I tried that Driver on app server. I was hoping that it would work but now I got another error as below : ************************** [oias][DB2 JDBC Driver]Failed to access database MVSDB2T.[oias][DB2 JDBC Driver][DB2]Error occured with SQLCode -1334 with the following parameters: null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ********************* So after digin into this error I found out that "SQL1334N The database server cannot be used to route a remote request to a second database server in this configuration.". So I talked to our Mainframe ppl and found out that we are using a Gateway to connect to Mainframe. The actual Physical database is somewhere else which we dont have control over. So I wrote a question to DataDirect's Forums and one of the Developer/admin got back to me with the answer saying that DataDirect doesnt support connecting to remote databases through the DB2 Gateway. Now I dont know how to handle this situation. I thought of creating EJBs but I am not sure how its goig to work. Sorry guys for writing such a long post but I wanted you all to understand the situation and give me suggestions/solution for this. Thanks in advance. Any kind of help would be appreciated.
  2. Hello Hiren Have you tried with the Oracle supported JDBC Driver for DB2. you can find them on OTN, they are Type4 drivers (100% Java) and are portable across your different environments. Download them from: (See DataSirect JDBC Drivers) Tug