Solved

Help connecting to db2 from SQLEXPLORER

Posted on 2009-07-11
3
2,186 Views
Last Modified: 2012-05-07
I'm trying to find an interactive admin/development environment for db2 on Windows.  I downloaded SQL Explorer, but cannot seen to connect to db2 on my home server.  My db2 instace is named as the default 'DB2COPY1' (but just shows up as DB2 in Control Center).  I have tried setting up a new SQL Explorer connection to my DB@ server as:

SQL Explorer Default driver:     'JDBC ODBC Bridge'
URL:     jdbc:odbc://localhost/db2copy1 (also tried just db2)
user:     mitch (A W2k3 domain user that I use to log into the server and I seem to gain full access to db2 without further authentication)

Keep getting error:

"Could not connect to your database alias; the excat message was:

Cannot connect to MyLocalConnectionProfile/mitch.  Check your URL [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Do you want to try again?"

I'd really like to try this app out.  Bouncing back and forth from tab to tab in IBM's tools is slowing me way down.  I'm used to typing ad hoc queries and getting imidiate feedback in the same window.  Also would be nice to be able to explore schema/table structures and names without switcing windows too.
0
Comment
Question by:SQLMitch
3 Comments
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 20 total points
ID: 24834029
Hi Mitch,

I've never used SQLEXPLORER, but it certainly looks like a fine tool.

The driver/URL looks suspicious.  Try this one:

  jdbc:db2://localhost/db2copy1



Good Luck,
Kent
0
 
LVL 5

Accepted Solution

by:
Brian Chan earned 30 total points
ID: 24845923
It is certainly you have problem with driver. I have used two different SQL clients and so far I always have to use the IBM's java jdbc driver. Do you have access to IBM's download website? For drivers and client, I think you just need to registered an IBM ID and you will be able to download it.

The connection string should be then:

jdbc:db2://[hostname]:[port#]/[database name]

0
 

Author Closing Comment

by:SQLMitch
ID: 31602469
Indeed I did have to download the jdbc driver for DB2 from IBM's website.  Then had to configure SQLEXPLORER to use this driver (the only driver that comes preconfigured with the download is the ODBC-JDBC bridge, which aparently requires an ODBC DSN set up on local machine in order to connect).  Once the db2 jdbc driver was instaleed and configured on SQLEXPLORER, the connection strings you recomended worked perfectly, thanks.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question