f



? connect to db2 as400 server

i'm new to database connectivity through java.

can u help/guide  me how to connect to db2 as400 server(os 400) from 
client windows/linux terminal through jdbc .

i'v downloaded the jdbc db2 driver from i-net .

tell me the specification regarding where to place the 
drivers,classes,libraries etc.

Do i need to edit or create the database.properties file 

thanks


-
progpro
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------
 
0
progprob
10/1/2004 9:15:38 PM
comp.lang.java.databases 3049 articles. 0 followers. samyaksulabh (16) is leader. Post Follow

2 Replies
650 Views

Similar Articles

[PageSpeed] 29

Hi,

you need another driver, you'll find it at
http://www-1.ibm.com/servers/eserver/iseries/toolbox/downloads.htm
its an pure java driver and runs on any java system. The driver class is 
com.ibm.access.AS400JDBCDriver
the url you need is 
jdbc:as400://HostName/DefaultSchema

Dieter Bender

progprob wrote:

> 
> i'm new to database connectivity through java.
> 
> can u help/guide  me how to connect to db2 as400 server(os 400) from a
> client windows/linux terminal through jdbc .
> 
> i'v downloaded the jdbc db2 driver from i-net .
> 
> tell me the specification regarding where to place the
> drivers,classes,libraries etc.
> 
> Do i need to edit or create the database.properties file
> 
> thanks.
> 
> 
> 
> --
> progprob
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------

0
Dieter
10/2/2004 5:22:46 PM
> i'v downloaded the jdbc db2 driver from i-net .

Hello !

No, you need to download jt400.jar library, if you have IBM Client Access
installed try to search that file.

Then, the connection method is rather simple, see my sample code below ( you
have to change some line to get it works )

/* (non-Javadoc)
  * @see jdbconn.model.dbengine#openConnection()
  */
 public Connection openConnection(String IP,String DBname,String UID,String
PSW) {

  this.server = IP;
  this.dbName = DBname;
  this.uid = UID;

  Connection db2Conn = null;
  try {
              DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver());
              db2Conn =
DriverManager.getConnection("jdbc:as400://"+IP+"/"+DBname+";user="+UID+";pas
sword="+PSW);
              return db2Conn;
         } catch (SQLException e) {
            System.out.println("Error while connecting to "+IP+" with
user="+UID);
            System.out.println("SQLException: "+e.getMessage());
            System.out.println("SQLState: "+e.getSQLState());
            System.out.println("Vendor Error: "+e.getErrorCode());
        return null;
         }
 }

Hoping this helps,
ciao
Alberto


0
Alberto
10/8/2004 8:42:24 AM
Reply:

Similar Artilces:

how to use db2 connect server as a gateway to connect to mainframe db2 database
we have os/400 db2 database at the backend. i installed db2 v9 connect server on one windows server which is locating the same network with database server. now how to i configure the connect server and client, so client could access the database through the connect server? like that: db2client <--> db2 connect server <--> db2 mainframe database IBM keeps talking about this structure but never mention about the configuration in all the manuals.:( thanks for help! jeffhan wrote: > we have os/400 db2 database at the backend. > i installed db2 v9 connect...

java.lang.NoSuchMethodException when trying to connect to DB2 with a connection pool
Hi, I've set up a DB2 8 database and I'm trying to connect to it with Sun ONE webserver 6.1 on AIX 5.2. When I test the webapp I get "auth failed server does not support this method/mechanism". After looking into it I found out the server only allows "Username only authentication" After adding "SecurityMechanism" to the Connection Pool parameters I get java.lang.NoSuchMethodException: com.ibm.db2.jcc.DB2SimpleDataSource.setSecurityMechanism(boolean). I'm not sure why it's sending the 4 as a boolean rather than as an int or short. ...

HELP
HELP - Need to connect to DB2 database on AIX from NT server. Also AS/400 from NT Server -- I am experienced in ORACLE and a novice at DB2. What tools would be the equivalent of Net*8 or SQLNET in ORACLE that would allow me to connect to a database on a remote box (either AIX or AS/400)? I have read that DB2 Connect appears to be the ticket for the Db2 server if it is on AS/400 or OS/390. What if it is on AIX? Does the same tool apply? All help is appreciated. hi, To connect to DB2 db on AIX from windows you will just be needing the db2 client and then you have to catalog ...

java.sql.SQLException: No suitable driver when connecting to a DB2 database using driver COM.ibm.db2.jdbc.DB2XADataSource
Hi, I want to get connection to a DB2 database using the driver COM.ibm.db2.jdbc.DB2XADataSource. I have also included 'db2java.zip' in the classpath. However I am getting the exception java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at Conn.main(Conn.java:44) The code that I am using (with try/catch removed) is as follows: String url = "jdbc:db2:sample"; String driver = "COM.ibm.db2.jdbc.DB2XADataSource"; String dbuser = "db2u...

connect a database in remote server (can connect to the server via SSH)
Hi, All: My perl code need to connect to a database (MySQL) in remote server, and I can login that server via SSH. I am a new to perl, can anyone give me a hint how can I do that. Many thanks. Xiaoyu zhangxiaoyu912@gmail.com wrote: > My perl code need to connect to a database (MySQL) in remote server, > and I can login that server via SSH. You don't need to have ssh access to the remote database server in order to be able to connect to the database (at least if the database server is configured to wait for remote connections). > I am a new to perl, can anyone give me a hint h...

java.lang.NullPointerException
>>>>>Hi! >>>>> >>>>>We are experiencing problems on a live application and are getting intermittent errors. The stack trace is as follows. As the system is live, this is urgent. >>>>> >>>>>java.lang.NullPointerException >>>>> at org.postgresql.Connection.ExecSQL(Connection.java:312) >>>>> at org.postgresql.jdbc2.Connection.setAutoCommit(Connection.java:141) >>>>> at org.enhydra.jdbc.standard.StandardXADataSource.getFreeConnection(StandardXADataSource.jav...

Java Database connection pooling for standalone server
Hi, I am new to java and db connection pooling. I tried using Apache's DBCP for connection pool for my web application. Was trying to do similar thing for a standalone server (not a web based). I tried using DBCP but i am getting strange results. In my string variables, i am getting "???" as output whereas for int variables i am getting correct values when i m trying to read from database. Here is the snippet code: I have a package "com.engine". In this package, 1. I am having EngineDBConnection which is responsible to pool connections. 2. "EngineDBManager" class takes care of process user's queries and calls required procedures and db constructs 3. "Test" is the actual code which runs and gets required fields and displays to client. >>>>>>>>>>>>>. package com.engine; import org.apache.commons.dbcp.BasicDataSource; import javax.sql.DataSource; import java.sql.Connection; import java.sql.SQLException; public class EngineDBConnection { private static String dbURL = "jdbc:oracle:thin:user/pwd@localhost: 1521:orcl"; static DataSource dataSource = null; public static void createDataSource(){ // create db connection in constructor dataSource = setupDataSource(dbURL); } public static Connection getConnection() { Connection conn = null; try { if (dataSource != null) { conn = dataSource.getConnection(); } else {...

Connecting .net project with db2 in AS400 server
can any one give the solution for this problem WE developed a .net project in windows platform which have db2 as database. And Our client is having the database in AS400 server, so when we uploaded the system to windows server in client's side and try to connect with db2 in AS400,its displaying an error. Can any one give answers for this 1)It will work fine, If we install the client instance of db2 in windows server. 2)or we can connect the database directly to the AS400 server. hope anyone can help me to solve this Thanking you Shyam yeskay wrote: > can any one give the solution fo...

connection error from .net to as400 db2 database
I am getting the following error while trying to connect to a DB2 database on the as400.It worked fine at first then I started getting this err message. Non-NULL controlling IUnknown was specified, and either the requested interface was not IUnknown, or the provider does not support COM aggregation. Dim cndb As New OleDb.OleDbConnection("Provider=IBMDA400.DataSource.1;Password=SADW;User ID=pg3000001;Data Source=as9625g;Protection Level=None;Transport Product=Client Access;SSL=DEFAULT;Force Translate=65535;Default Collection=PG3000001;Convert Date Time To Char=TRUE;") ...

Connecting to db2/400 of AS400 through java throwing SQLException
Hello, I am trying to connect to db2/400 of as400 through java in WDSC. I am usinf the driver -> com.ibm.db2.jcc.DB2Driver I have put the db2jcc.jar and db2jcc_license_c.jar in classpath. I am not ableto connect with db2/400 The code for connecting to the database is follows--> ****************************************************************************** //Connect to a database try { Connection conn = DriverManager.getConnection ("jdbc:db2:192.168.0.10","SAVITA","SAVITA"); } catch (SQLException...

Establishing connection from Oracle Database to DB2 database
Hi, Can any one help me in connecting oracle database to DB2 database oracle is on unix and DB2 is on AS400. Please guide me step by step on the same. Waiting for reply. Its critical umeshchoudhary@gmail.com (U C) wrote in news:d06590c8.0504252348.71a5c6f8@posting.google.com: > Hi, > Can any one help me in connecting oracle database to DB2 database > oracle is on unix and DB2 is on AS400. Please guide me step by step on > the same. > > Waiting for reply. Its critical > use PERL between the two DBs. >Hi, > Can any one help me in connecting oracle database...

How to connect WHow to connect WINCE to AS400 DB2 ?
I'm looking for a solution to connect from a WinCE device to an AS400 Database (or MySQL or whatever else other than MS SQL). ADOCE for example is only supporting a connection to an local Access Database or the local file system. I tried ViaDB from Odessey Software (a trial version for one connection) but no succsess. I have looked for several solutions in C++, VB and Java but nothing seems capable to get an easy connection to a database connected wireless. Maybe someone can help me. Thanks. -- "Warum haben wir eigentlich nie Zeit, eine Sache richtig zu machen, aber immer Ze...

Java client connected to non-Java server problems
I'm trying to connect a java client application to a chat server i wrote in vb. i know the server works, and i know the client works(when used with a java server), but when i use the vb server and the java client, the client doesn't get the data sent from the server. But then when i send back from the client to the server, then what i sent from the server shows up, so it's like the buffer isn't getting read or flushed when i send from the server. What is the best approach i should take on this? illusionistx@gmail.com (Illusionistx) wrote in message news:<cbfebe80.0411091822...

tcl database connection for Oracle MySQL PostgreSQL Sybase "Microsoft SQL Server 2000 Desktop Engine" DB2 Interbase/Firebird SQLite Microsoft Access
Hello everyone, There are many people that are looking for/missing the support for their database within TCL. Somehow this was overlooked: http://sqlrelay.sourceforge.net/index.html It has native TCL API and supports most popular databases. One problem: It doesn't have production ready support on Windows, but for the lucky people who use Linux/Unix, it seems to be an excellent solution, while TDBC is being developed. One small correction, the TCL part of the db connection will work just fine on Windows connecting to sqlrelay running on Linux/Unix (which, in turn, can connect to the d...

Connect to IBM DB2 database without installing the DB2 client.
Hi, To connect to the DB2 Driver, from a remote machine. Do we requier DB2 client. Can't we connect by just having IBM DB2 driver which is just a single file (db2cli.dll). I am using vb application from Windows platform to connect to DB2 on Linux machine. Regards, Santosh SB wrote: > Hi, > > To connect to the DB2 Driver, from a remote machine. Do we requier DB2 > client. > Can't we connect by just having IBM DB2 driver which is just a single > file (db2cli.dll). > I am using vb application from Windows platform to connect to DB2 on >...

DB2 Connectivity problem from a wndows client to DB2 AS/390 server
hi all, I have a DB2 connect PE ver 8.2 installed in my windows client which tries to connect to AS/390 Database Instance via CCA.It uses TCP/IP. While trying to connect the Server from the windows client SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "192.168.134.201". Communication function detecting the error: "connect". Protocol specific error code(s): "10060", "*", "*". SQL...

connection to db2 database through db2 client on windows slows down intermittently
we are facing a problem here.We have two different IDs from which we connect to db2 database through Db2 client on windows. When I try connecting to database through one ID it establishes connectivity in 2-3 sec and when i try accessing connecting to same database through second ID it takes 5-6 minutes sometimes,although sometimes it hapens in seconds. When my colleagues try to access database through the second ID i tried with they get connected ie have connectivity in seconds. coonections are open to database . what might be the problem!any clue? we restart the database and then connection gets established. On 2 Aug 2006 08:59:55 -0700, zagri_as@yahoo.com <zagri_as@yahoo.com> wrote: > we restart the database and then connection gets established. Since the question is about connecting to DB2, have you asked in a more appropriate forum such as comp.databases.ibm-db2? You might get a different - better - response there. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/ ...

Is there a way to drop DB2 database buffer pool without connecting to database?
Greetings, We are having a situation here whereby one of our staff created a very huge 32K buffer pool in a production database and caused the database to go down. When we try to reconnect to the database using "db2 connect to <dbname>", its giving the following error: SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE:55032 Now we are not able to connect to the database eventhough after we restart the server and instance. What we are thinking now is whether it is possible to drop the 32k buffer pool without connecting to the database. Or is there any other workaround that would help us to resolve this problem. Your feedback is very much appreciated. Thank you. One possible way to solve the current problem is .. Create an registry variable db2 set DB2_OVERRIDE_BPF=<no of pages> --Set it to a optimum level based on the memory limits u have! .. Restart the instance On Feb 15, 2:17 pm, xeqis...@gmail.com wrote: > Greetings, > We are having a situation here whereby one of our staff created a > very huge 32K buffer pool in a production database and caused the > database to go down. When we try to reconnect to the database using > "db2 connect to <dbname>", its giving the following error: > > SQL1224N A database agent could not be started to servi...

How to create a federation server to db2/400 in a db2 udb AIX databases
Hi, All, We have a database on db2 udb aix. The database has federated server to db2 mainframe. Now We have already catalog database of db2/400 on the db2 UDB aix server. I tried to create new federation server for db2as/400. It seam has problem. 1. can the db2 mainframe and db/400 have the same wrapper? Our existing db2 mainframe uses the wrapper with library libdb2drda.a This wrapper is used by db2 mainframe 2. When i create a new federated server for db2/as400 with the same wrapper and try to create nicknmae under it,it showed the following error message: Error: SQL0204N &q...

Does somebody have the tutorials of using "db2 connect" as connection server?
I'm trying to find out some tutorials of using "db2 connect" as an connection server. Wanna to use this to save the tcp/ip connections and have a block read ability. it's great if u share me with the example of c# :) wildfish <wildfish@gmail.com> wrote: > I'm trying to find out some tutorials of using "db2 connect" as an > connection server. > Wanna to use this to save the tcp/ip connections and have a block read > ability. > it's great if u share me with the example of c# :) You could start digging from : http://www-106.ibm.com...

Using the DBI to connect to an Oracle server w/o connecting to a database
I've searched for the answer to this problem and have not seen it (which suggests what the answer might be ;-) ). Is it possible to use DBI (and DBD::Oracle) to connect to an Oracle server without connecting to a database? This would be the DBI equivalent of: sqlplus /nolog SQL> connect user/passwd@database; or, more similarly: sqlplus /nolog @my.sql where my.sql might be: connect user/passwd@database; select ... etc. I'm thinking this is not possible, but I hope it is. Thanks. Quoth Tim <google@hoodfamily.org>: > I've searched for the answer to this problem and...

Java, "Connection refused: connect"
I've been happily playing away with my client/server program for most of this weekend. I decided earlier today to take it to the next step and try running it on two machines. ....Boy did that not go over well. The funny thing is, I did everything I could possibly thing of to make the program real-network-ready. But then I got this: -=- java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) -=- Not descriptive, but okay, I did a google for this, and got hundreds of: "That error means you don't have a server run...

db2 client to connect to host databases and create/use local databases too
Is it possible to install DB2 client product(s) so that the same system can connect to host databases like DB2 Connect can, *and* can also create and use local databases like DB2 Personal can? I have "DB2 Personal Edition" installed now, which does everything I want except I get an SQL8002N about missing DB2 Connect product/license when I try to connect to an OS/400 database. I was thinking of trying "DB2 Connect Personal Edition", but I cannot find confirmation anywhere of whether that would let me also create and use local databases... On 17.04.13 12:31 , Cind...

db2 connection lost from my db2 client on window to aix server after some time
Hi, I have encountered a very strange situation. I just changed my laptop and installed db2 Administration client. I run a db2 CLP ranning statistic on 500 tables from my db2 command window on my laptop and the connection was disconnected after 30 minutes. Is this for some set up on my new laptop? George Thanks, On Apr 24, 8:29 am, zgh1970 <george.zh...@lombard.ca> wrote: > Hi, > I have encountered a very strange situation. > I just changed my laptop and installed db2 Administration client. > I run a db2 CLP ranning statistic on 500 tables from my db2 comman...

Web resources about - ? connect to db2 as400 server - comp.lang.java.databases

First Capital Connect - Wikipedia, the free encyclopedia
( FCC ) is a British train operating company , owned by FirstGroup , operating the Thameslink Great Northern franchise . FCC operates passenger ...

Connect
mobile photography technology, culture and community www.dpreview.com News Reviews Features Phones Tablets Cameras Apps Forums Mobile photography ...

CloudCraze Connects Consumers To Facebook Brands Via Cloud Technology
Brands on Facebook are always looking for new, efficient ways to connect with customers . CloudCraze, which recently released its 3.0 e-commerce ...

Apple rolls out redesigned Payments and Financial Reports view in iTunes Connect to developers
... is rolling out a small but useful improvement to developers today. It has overhauled the Payments and Financial Reports section of iTunes Connect ...

Connect shapes with one path in Linken, an elegant puzzler
For a new puzzle experience with challenging levels, attractive visuals, and a smooth soundtrack, Linken is your game. Just connect the colored ...

Apple launches 'Podcasts Connect' Web portal for managing digital content
Apple on Tuesday made it easier for podcaster to validate, publish and manage their content online with the launch of a new iTunes Connect-based ...

Samsung Connect Auto brings LTE data to your car
Filed under: Infotainment , Smartphone , Technology Samsung revealed its own take on smarter vehicle tech, called Connect Auto.

Samsung Connect Auto turns your dumb car into a smart car
It's not just brand new vehicles that can be considered smart cars. Today Samsung launches Samsung Connect Auto, a plug-in module that can transform ...

The State of Apple Music Connect
Dave Wiskus: If Connect is a social network, it fails miserably. There’s nothing inherently social about the experience, which feels more like ...

Facebook is trying to blow up another huge market as it attempts to connect the entire world
Facebook wants to connect the world. That's why it formed Internet.org, which offered free access to (parts of) the internet in the developing ...

Resources last updated: 3/2/2016 9:24:39 PM