Thursday, August 26, 2010
Installing Toolkit for Oracle ( TOra) Database Client in Fedora 13
Tora – Toolkit for Oracle on Fedora 13
Tora is an Linux based Databse Client GUI application to access an databases Mysql, Postgres and Oracle. For Linux users, Tora is an Oracle client program equivalent to SQLTools in Windows. I herewith explain the installation method of tora on Fedora 13 (Goddard) without installing Oracle Database.
Requirement:
1. PC with Fedora 13 OS
2. Network connection with static IP
Installation:
Before starting installation, it is required to download the Oracle Client RPMs from Oracle website.
http://www.oracle.com/technology/sof...ent/index.html
Also required to download tora latest RPM from Sourceforge website. I downloaded latest tora binary file from Sourceforge website. The packages downloaded are
1. oracle-instantclient-basic-10.2.0.4-1.i386.rpm
2. oracle-instantclient-jdbc-10.2.0.4-1.i386.rpm
3. oracle-instantclient-odbc-10.2.0.4-1.i386.rpm
4. oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
5. tora-2.1.2-1.fc13.remi.i586.rpm
6. tora-2.1.2.tar.bz2
In the above list, 'oracle-instantclient-jdbc' is not an compulsory.
STEP1:
Pre-installation requirements:
It is required to install Development Tools and Qt application is required for oracle client and tora. Hence the same should be installed first
# yum groupinstall “Development Tools”
STEP 2:
Installing Oracle instant Clients:
Install the oracle client RPMs, from its directory where it is downloaded
# yum localinstall oracle-instantclient-*.rpm --nogpgcheck
or
# rpm -ivh oracle-instantclient-*.rpm
STEP 3 :
Setting up Environment variables:
For proper functioning of oracle Instant Client, Environemt variables should be defined correctly. Create and open '/etc/profile.d/oracle.sh' file.
# gedit /etc/profile.d/oracle.sh
Paste the following line,
----------------------text in the file----------------------------------
#!/bin/sh
# Set up Oracle environment
export ORACLE_HOME=/usr/lib/oracle/10.2.0.4/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME
----------------------text in the file----------------------------------
# chmod +x /etc/profile.d/oracle.sh
Please ensure your Oracle instant Client version. To take effect, run
# source /etc/profile.d/oracle.sh
STEP 4 :
Checking Oracle-Instant-Cleint:
Copy tnsnames.ora file in Oracle-Home directory.
-----------------------screen shot ------------------------------------
[tneb@localhost ~]$ more $ORACLE_HOME/tnsnames.ora
MGR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP ) ( HOST = 172.20.1.10) (PORT = 1521))
(CONNECT_DATA = (SID=cbelt))
)
[tneb@localhost ~]$
[tneb@localhost ~]$ sqlplus hhd@MGR
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 25 15:00:47 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select sysdate from dual;
SYSDATE
---------
25-AUG-10
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[tneb@localhost ~]$
----------------------screen shot ----------------------------------
STEP 5 :
Tora Installation:
Copy the ' libclntsh.so.10.1' and ' libocci.so.10.1' as ' libclntsh.so ' and ' libocci.so' respectively.
# cd $ORACLE_HOME/lib
# cp libclntsh.so.10.1 libclntsh.so
# cp libocci.so.10.1 libocci.so
Then, goto Tora binary file directory and extract it.
$ tar xvjf tora-2.1.2.tar.bz2
Open tora folder
$cd tora-2.1.2
Then run the configure file as root
$ su
# ./configure
After that make it and install it.
#make
#make install
STEP 6 :
Running Tora
$ tora
The new window shows as below
Enter username, password, DB Name( host string name) as mentioned in tnsname.ora and select Color Session identifier as you wish, then press Ok.
In the window, in the sql-editor plane enter your query and run it,
The screen shot of result is as below,
The table schema browser shows the table structure and screen shot is as below,
TROUBLE SHOOTING :
1. If 'ORACLE_HOME/lib' not found error shows when running configure file, then add the path by creating new conf file in ld.so.conf.d directory
# echo "/usr/lib/oracle/10.2.0.4/client/lib" > /etc/ld.so.conf.d/oracle.conf
Run ldconfig to take effect,
# ldconfig
2. If there is an error as 'Qt not found' then add the paths in configure running script input as below
# ./configure --with-qt-dir=/usr/lib/qt-4 --with-qt-includes=/usr/lib/qt-4/
include --with-qt-libraries=/usr/lib/qt-4/lib
3. Any other errors then add relevant paths in command line, the typical command as below.
# ./configure --with-qt-dir=/usr/lib/qt-4 --with-qt-includes=/usr/lib/qt-4/
include --with-qt-libraries=/usr/lib/qt-4/lib --with-oracle=$ORACLE_HOME --with-
oci-version=10G --with-oracle-libraries=$ORACLE_HOME/lib --without-kde –enable-libsuffix=
4. If 'tora' command not working then create an symbolic link in library, then try
# ln -s /usr/local/tora/bin/tora /usr/bin/tora
Caution: Paths are depends as your OS and application versions.
Happy Tweaking,
Padhu
* * * * *
Subscribe to:
Posts (Atom)