Rebuilding Tora with Oracle Support

Tora is a graphical toolkit for database developers and administrators. It features a schema browser, SQL work-sheet, PL/SQL editor and debugger, storage manager, rollback segment monitor, instance manager, and SQL output viewer. Via QT3 it can access PostgreSQL and MySQL directly. Any other database systems can be accessed via ODBC.

Tora on debian, doesn’t have Oracle support because of incompatibility licence with GPL. I have done rebuilding Tora (I use version 1.3.1 8) with oracle support on Debian Sid (Unstable), so i wanna share it with everyone because this thing has given me a lot of headaches. Well, let’s go ahead ! Below are steps you should do :

1. Install Oracle Instant Client
You can get it from :
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
Get the RPM package and then convert it to debian package using alien.
# dpkg -i oracle-instantclient-basic_10.2.0.1-2_i386.deb

# dpkg -i oracle-instantclient-devel_10.2.0.1-2_i386.deb
# dpkg -i oracle-instantclient-sqlplus_10.2.0.1-2_i386.deb
Three steps above will instal OIC on /usr/lib/oracle
2. Create file named tnsnames.ora on /usr/lib/oracle and fill with lines like below :
BILLPM =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 172.23.154.8)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = billpm)

)

)
3. Add line below to /etc/ld.so.conf :
/usr/lib/oracle/10.2.0.1/client/lib
Tell ld to reload its cache with :
# ldconfig
4. Add lines below to /etc/profile :
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.1/client/lib:$LD_LIBRARY_PATH

TNS_ADMIN=/usr/lib/oracle

export LD_LIBRARY_PATH TNS_ADMIN
5. Install Tora (tricky step in order to get all dependencies needed by tora :) )
# apt-get install tora
6. Get Tora source
# cd /usr/src
# apt-get source tora
7. Prepare rebuilding tora
Install several packages needed for rebuilding :
# apt-get install g++ gcc autoconf automake flex zlib1g-dev docbook-xsl
# apt-get install libqt3-mt-dev libqt3-compat-headers
# cd tora-1.3.18/
Edit file debian/rules. Find line like below :
./configure –prefix=/usr –without-oracle –without-rpath –disable-new-check –with-kde –enable-libsuffix=
Replace with line like below :
./configure –prefix=/usr –with-instant-client –without-rpath –disable-new-check –without-kde –enable-libsuffix=
8. Rebuild Tora
# debian/rules binary
9. If nothing wrong you will get the deb on /usr/src. Next, you can install it :
# cd ..
Remove Tora first :
# apt-get remove tora
Install a new one :
# dpkg -i tora_1.3.18-2_i386.deb
10. Test the connection with sqlplus. If you use console then you must start a new one or relogin.
# sqlplus user/userpass@BILLPM (BILLPM according to example lines of tnsnames.ora above)
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 7 19:58:12 2005

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.3.0 - Production

2 Responses to “Rebuilding Tora with Oracle Support”


  1. 1 regis August 21, 2006 at 1:35 pm

    i wrote my own tutorial, it is a little more simple i think.

    http://wikki.lerayregis.com/doku.php?id=tora_toad_pour_linux

    Thanks for share your experience.

  2. 2 regis August 21, 2006 at 1:37 pm

    Oups, i forgot to tell , the tutorial is in french….

Leave a Reply




 

August 2006
M T W T F S S
« Mar   Oct »
 123456
78910111213
14151617181920
21222324252627
28293031  

Blog Stats

  • 3,942 hits