Re: [Squirrel-sql-users] Connecting for the first time
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Colin B. <col...@te...> - 2003-09-15 22:30:48
|
Just to add to what Glenn said. DB2 ships with a JDBC driver. You can find it (on Windows) in <db2-program-dir>\java\db2java.zip, it should be somewhere similar on Linux. Just add that zip/jar file to the Extra Class path tab in your driver definition (as per Glenns email). One gotcha with DB2 is that it defaults to JDBC 1.0 and you really need JDBC 2.0. Under Windows there is a batch file <db2-program-dir>\java12\usejdbc2.bat which will change DB2 to be JDBC 2.0. Theres probably something similar under Linux, should be in the documentation somewhere. I haven't tried ODBC under Linux yet so I'm afraid I can't give you any help there. -- Colin Bell http://squirrel-sql.sf.net ----- Original Message ----- From: Glenn <gw...@co...> Date: Tuesday, September 16, 2003 5:02 am Subject: Re: [Squirrel-sql-users] Connecting for the first time > Hi Russel, > > Given the way IBM has been leaning towards Java, I'm guessing that > they > provide a JDBC driver as part of the DB2 package. Have you > rummaged > around in the directories where DB2 was installed? (I am assuming > from > what you have said that you are running DB2 on your local > machine.) You > might do a search on your whole machine like: > find . -name \*db\*.jar > > Check out http://servlet.java.sun.com/products/jdbc/drivers where > you > can search for drivers. IBM has several listings under DB2 > drivers, and > I've seen email references to "free JDBC driver download from > IBM", so > you should be able to find something. > > I'm not knowledgable about ODBC either. Maybe you can just use > ODBC to > access DB2 from SQuirreL? I know that there are free ODBC drivers > out > there, though I can't cite them off hand. Try the same source. > > Good luck! > > Glenn > > RP wrote: > > > Excellent - very informative, thanks! > > > > It seems this should be an easy one then - once I get the new > > terminology sorted! The .jar bit is where I start getting muddled > > at the moment. Currently I'm using UnixODBC & PHP to access DB2 - > > and hence, no .jar files. I have a nice odbcinst.ini file with a > > driver section telling UnixODBC to use the driver found here: > > /usr/IBMdb2/V7.1/lib/libdb2.so.1 > > > > Yes, exactly! > > > > A quick google on "JDBC DB2" gives me a whole bunch of commercial > > companies selling their high-performance JDBC drivers for DB2. > > Now, I assume there is a free JDBC driver for DB2 somewhere? > > > > Perhaps maybe the question I should be asking is "Can I use > > UnixODBC with SQuirreL?" > > > > Thanks again, > > Russell > > > > ----- Original Message ----- > > From: "Glenn" <gw...@co...> > > To: "R P" <xy...@ho...> > > Cc: "squirrel-sql-users" > > <squ...@li...> > > Sent: Monday, September 15, 2003 4:53 PM > > Subject: Re: [Squirrel-sql-users] Connecting for the first time > > > > > > > >>Hi, > >> > >>I am not a DB2 user, so I can't give you details. Hopefully > >> > > someone > > > >>else on the list can give you more info. > >> > >>To get the red X to change to a blue check mark, you need to > >> > > tell > > > >>SQuirreL where the JDBC driver classes are. The steps should > >> > > be: > > > >>- find the location of the .jar file containing the drivers on > >> > > your > > > >>system (sorry, I don't know what it is called in DB2). I'm > >> > > assuming > > > >>that one came with your DB2 distribution. If not you will need > >> > > to get > > > >>one and install it. > >>- in SQuirreL, double-click on the DB2 line in the "Drivers" > >> > > list. > > > >>(Fortunately, you have an entry for DB2 already there.) > >>- in the resulting window, click on the tab "Extra Class Path" > >>- click on the Add button, and use the pop-up browse window to > >> > > select the > > > >>driver's .jar file. > >>- check the "Example URL" entry. According to the DB2 > >> > > documentation that > > > >>I found on-line, it should look something like: > >>jdbc:db2://<host>[:446]/<dbname> > >>where the "db2" means a DB2 UDB server. That would be replaced > >> > > by "db2j" > > > >>for local Cloudscape access and by "db2j:net" for remote > >> > > Cloudscape access > > > >>- click OK to close the DB2 driver window > >> > >>At that point you should see the red X turn into a blue check > >> > > mark, but > > > >>you need to do a bit more to access the actual DB. The previous > >> > > setup > > > >>just told SQuirrel about DB2 databases in general. To access a > >> > > specific > > > >>DB, you need to go to the Alias box and click on the "+" sign > >> > > (or go to > > > >>the "Alias" menu item and select "New"). In the resulting form, > >> > > you > > > >>need to fill in the name, select the driver (DB2), and adjust > >> > > the > > > >>example URL to become the actual URL for your database. My > >> > > guess is > > > >>that the URL should be: > >>jdbc:db2://localhost:446/<dbname> > >>where you replace <dbname> with your database name, but since I > >> > > don't > > > >>have DB2 I cannot verify that that URL works. > >> > >>The User and Password are not required, but if you do not fill > >> > > them in > > > >>here you will need to type them each time you open the DB. > >> > >>When you have filled in the entries, clicking Test will tell you > >> > > if > > > >>SQuirreL can get to your DB. If so, click OK and you're all > >> > > set. If > > > >>not, try tinkering with the URL, look for help on the internet, > >> > > and, of > > > >>When you have filled in the entries (course, email the SQuirreL > >> > > group again. > > > >>I understand about the confusion factor. Hope this helps. > >> > >>Glenn > >> > >>R P wrote: > >> > >> > >>>Hi, > >>> > >>>I have DB2 7.1 FixPAck 10 installed on my RedHat Linux box. > >>> > > How do I > > > >>>connect to this database using Squirrel-SQL? > >>> > >>>I have tried following the instructions, but they do not say > >>> > > how to get > > > >>>the currently red-crossed IBM DB2 driver to turn into a tick? > >>> > > I assume > > > >>>once I get past this hurdle, I would be able to connect? > >>> > >>>Please also bear in mind all this is totally new to me - I'm > >>> > > used to the > > > >>>ease of MySQL, so this whole ODBC weirdness is exceptionally > >>> > > confusing! > > > >>>Any hints greatly appreciated, > >>> > >>>R > >>> > >>> > >>> > > _________________________________________________________________ > > > >>>Stay in touch with absent friends - get MSN Messenger > >>>http://www.msn.co.uk/messenger > >>> > >>> > >>> > >>>------------------------------------------------------- > >>>This sf.net email is sponsored by:ThinkGeek > >>>Welcome to geek heaven. > >>>http://thinkgeek.com/sf > >>>_______________________________________________ > >>>Squirrel-sql-users mailing list > >>>Squ...@li... > >>> > >>> > > https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users > > > >> > >> > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Squirrel-sql-users mailing list > > Squ...@li... > > https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Squirrel-sql-users mailing list > Squ...@li... > https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users > |