Tag: oracle

gqlplus – sqlplus with readline (tab completion)

Tab completion is something which is missing in the sqlplus and if you have lot of tables with long names or lot of columns then it is sufficiently┬á difficult to type them ­čÖé

Here is a solution for this problem. Download and install gqlplus. gqlplus is a replcement for sqlplus which supports completion for commands/tablenames and column names. Quite useful.

Oracle SQL*Plus
Oracle SQL*Plus (Photo credit: Manuel Cernuda)
Enhanced by Zemanta

Oracle Select the top 5 queries

Here are one sql script that I found some time back. This will be listing the top 5 SQL queries in Oracle.

SET linesize 300
SET PAGESIZE 200
select *
from
(select sql_text,
        sql_id,
        elapsed_time,
        cpu_time,
        user_io_wait_time
from    sys.v_$sqlarea
order by 5 desc)
where rownum < 6;
quit;
Enhanced by Zemanta

Oracle GUI client on Linux with mysql support


I was looking for some nice client for Oracle and mysql. I did find mysql-administrator and navicat to be useful but this is much better. Tora is the client that I am talking about. Installation did not take much time for me..

downloaded the instant client from oracle.com and then the tora rpm from sourceforge.net. Also downloaded the tora-mysql from http://rpm.pbone.net/index.php3/stat/21/year/2002/month/01/day/28

Then tried to install all the rpms found the rpms that were missing and installed them using yum. Once this is done install the downloaded rpms with \”–nodeps\” option of rpm.Put the entries in bashrc

export ORACLE_HOME=/usr/lib/oracle/11.1/client/
export LD_LIBRARY_PATH=/usr/lib/oracle/11.1/client//lib:$LD_LIBRARY_PATH

When I tried to run the same, it gave me some errors about missing \”.so\” files. So went to /usr/lib directory. The files would be there but the names would not match so link the existing file with the name expected for tora and you are done. Here is the screenshot of TOra 2.0

\"TOra\"

Leave a comment if you are facing some issues with the installation.