Showing posts with label Oracle DB. Show all posts
Showing posts with label Oracle DB. Show all posts

Thursday, May 10, 2012

Connect Eclipse IDE to Oracle DB using TNS configuration file

Check new series of the articles. Review and user experience on test management systems. Functionality and usability.
-------------------

If you work with Oracle RDBMS you probably use the SQL IDE like Oracle SQL Developer however some may want to use old and reliable Eclipse IDE. Lets look how to configure it to access oracle DB. We'll do that using the configs from so called TNSNames.ora file.

So open that file. You should find your database description there. It should look like this:
oracle TNSNames.ora example


You need the information highlighted with yellow.
Now open Eclipse IDE and enable 'Data Source Explorer' view. In that view right click on 'Database Connections' and choose 'New...'
Eclipse Data Source Explorer view

Choose Oracle from the vendor list, specify name and description and proceed with Next button
Eclipse New Connection Profile settings (Oracle TNS)
Set up your driver so that it is Oracle Thin Driver. Specify corresponding JDBC jar file for that.
Set up the server name, port number and SID. Also specify your credentials so that DB server can authenticate you. Your connection URL should now look like this
jdbc:oracle:thin:@1.2.3.4:1521:SAMPLE
Okay. Once your connection test is passed you may finish configuring and use it from corresponding view.
Eclipse IDE Oracle connection established TNS

Friday, May 04, 2012

Resolve JDBC incompatibility problem between ORACLE SQL Developer and ODAC

Check new series of the articles. Review and user experience on test management systems. Functionality and usability.
-------------------

Once tried to connect to Oracle DB server with Oracle SQL developer I got the following error message
Status : Failure -Test failed: Incompatible version of libocijdbc[Jdbc:112020, Jdbc-OCI:112030
After certain investigation and attempts to get connection established using different configurations I figured out the following root cause. The problem was in latest version of ODAC installed on my PC. Downloading and installing ODAC of version 11.2.0.2.1 eliminated the problem. Connection was then established successfully. In other words the latest Oracle SQL developer release does not properly work with the latest ODAC release

UPD: Looks like the compatibility of the latest ODAC+latest SQL Developer should be fine for now (March'13).