Solved

Help connecting to db2 from SQLEXPLORER

Posted on 2009-07-11
3
2,162 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 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