Discussion:
[Squirrel-sql-users] Unable to connect to IBM DB2 for LUW v10.1 using JDBC driver 3.65.77
Peter Dow
2013-05-14 19:20:58 UTC
Permalink
I've created an IBM DB2 database named MIRdb, and then tried to connect
to it using the Squirrel SQL Client version 3.4.0.

The driver is:
Name: IBM DB2 App Driver
Example URL: jdbc:db2:<dbname>
Class Name: COM.ibm.db2.jdbc.app.DB2Driver
Extra Class Path:
C:\Program Files\IBM\SQLLIB\java\db2java.zip
C:\Program Files\IBM\SQLLIB\java\db2jcc.jar
C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar
C:\Program Files\IBM\SQLLIB\java\sqlj.zip
C:\Program Files\IBM\SQLLIB\java\sqlj4.zip
C:\Program Files\IBM\SQLLIB\BIN

(my understanding is that I only need the db2java.zip, but I included
the rest when it didn't work)

The alias is:
Name: MIRdb
Driver: IBM DB2 App Driver (which as a check mark indicating it was
loaded)
URL: jdbc:db2:MIRdb
User name: db2admin
Password:

When I try to connect to the alias, I enter the password, click the
Connect button and get an Error window stating:
"Unexpected Error occurred attempting to open an SQL connection."

and clicking on the Stack Trace button, I see:
java.util.concurrent.ExecutionException: java.lang.RuntimeException:
java.sql.SQLException: Unable to create connection. Check your URL.
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.sql.SQLException: Unable to
create connection. Check your URL.
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
... 6 more
Caused by: java.sql.SQLException: Unable to create connection. Check
your URL.
at
net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:136)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
... 8 more

I am able to start an IBM DB2 command line processor window and connect
to MIRdb using the same userid and password.

Am I missing something obvious?

Peter Dow, IT Specialist
Montessori In Redlands
909 793-9050
Marcin Krol
2013-05-15 12:59:01 UTC
Permalink
Hello Peter,

I'm not sure that app driver even works well enough or it is updated.
Around here (big blue) everybody I know is using net driver.

IBM DB2 Net Driver
example url: jdbc:db2://<server>:<6789>/<db-name>
website: http://www-306.ibm.com/software/data/db2

extra classpath contains: db2jcc4.jar, db2jcc_license_cu.jar

class name: com.ibm.db2.jcc.DB2Driver


Above settings have worked for me for every 10.1 instance I worked with.


Regards,
Marcin Krol
Post by Peter Dow
I've created an IBM DB2 database named MIRdb, and then tried to connect
to it using the Squirrel SQL Client version 3.4.0.
Name: IBM DB2 App Driver
Example URL: jdbc:db2:<dbname>
Class Name: COM.ibm.db2.jdbc.app.DB2Driver
C:\Program Files\IBM\SQLLIB\java\db2java.zip
C:\Program Files\IBM\SQLLIB\java\db2jcc.jar
C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar
C:\Program Files\IBM\SQLLIB\java\sqlj.zip
C:\Program Files\IBM\SQLLIB\java\sqlj4.zip
C:\Program Files\IBM\SQLLIB\BIN
(my understanding is that I only need the db2java.zip, but I included
the rest when it didn't work)
Name: MIRdb
Driver: IBM DB2 App Driver (which as a check mark indicating it was
loaded)
URL: jdbc:db2:MIRdb
User name: db2admin
When I try to connect to the alias, I enter the password, click the
"Unexpected Error occurred attempting to open an SQL connection."
java.sql.SQLException: Unable to create connection. Check your URL.
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.sql.SQLException: Unable to
create connection. Check your URL.
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
... 6 more
Caused by: java.sql.SQLException: Unable to create connection. Check
your URL.
at
net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:136)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
... 8 more
I am able to start an IBM DB2 command line processor window and connect
to MIRdb using the same userid and password.
Am I missing something obvious?
Peter Dow, IT Specialist
Montessori In Redlands
909 793-9050
------------------------------------------------------------------------
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Peter Dow
2013-05-16 20:45:29 UTC
Permalink
Thanks Marcin. I wasn't sure what the difference between the App and
Net drivers was. I tried the Net driver again, with the Extra Classpath
you specified, and I got closer. Now it's failing because of a
user/pswd problem:

java.util.concurrent.ExecutionException: java.lang.RuntimeException:
com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException:
[jcc][t4][2013][11249][4.15.82] Connection authorization failure
occurred. Reason: User ID or Password invalid. ERRORCODE=-4214,
SQLSTATE=28000

I tried using db2admin, both with the password I changed it to have in
Active Directory and the default of db2admin; I also tried the
Administrator userid/pswd. I realize this is not strictly a Squirrel SQL
Client issue, but I'm new to both it and DB2 for LUW. I'm more used to
DB2 for i.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Peter,
I'm not sure that app driver even works well enough or it is updated.
Around here (big blue) everybody I know is using net driver.
IBM DB2 Net Driver
example url: jdbc:db2://<server>:<6789>/<db-name>
website: http://www-306.ibm.com/software/data/db2
extra classpath contains: db2jcc4.jar, db2jcc_license_cu.jar
class name: com.ibm.db2.jcc.DB2Driver
Above settings have worked for me for every 10.1 instance I worked with.
Regards,
Marcin Krol
Post by Peter Dow
I've created an IBM DB2 database named MIRdb, and then tried to connect
to it using the Squirrel SQL Client version 3.4.0.
Name: IBM DB2 App Driver
Example URL: jdbc:db2:<dbname>
Class Name: COM.ibm.db2.jdbc.app.DB2Driver
C:\Program Files\IBM\SQLLIB\java\db2java.zip
C:\Program Files\IBM\SQLLIB\java\db2jcc.jar
C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar
C:\Program Files\IBM\SQLLIB\java\sqlj.zip
C:\Program Files\IBM\SQLLIB\java\sqlj4.zip
C:\Program Files\IBM\SQLLIB\BIN
(my understanding is that I only need the db2java.zip, but I included
the rest when it didn't work)
Name: MIRdb
Driver: IBM DB2 App Driver (which as a check mark indicating it was
loaded)
URL: jdbc:db2:MIRdb
User name: db2admin
When I try to connect to the alias, I enter the password, click the
"Unexpected Error occurred attempting to open an SQL connection."
java.sql.SQLException: Unable to create connection. Check your URL.
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.sql.SQLException: Unable to
create connection. Check your URL.
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
... 6 more
Caused by: java.sql.SQLException: Unable to create connection. Check
your URL.
at
net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:136)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
... 8 more
I am able to start an IBM DB2 command line processor window and connect
to MIRdb using the same userid and password.
Am I missing something obvious?
Loading...