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

Tora installation on Fedora 16 with rpm

TOra
Image via Wikipedia

Last article I talked about tora installation from the sources, but if that is too much for you then you can use this one liner:

rpm -ivh "http://amit-agarwal.co.in/mystuff/tora-2.1.3-1.fc16.i686.rpm"

But if you like the hard way out, then you can always try this.

Enhanced by Zemanta

tora on Fedora 16 for mysql and Oracle.

Sometime back I had posted a article on Tora on Fedora. But that was a while back and things have progressed and we already have Fedora 16 (aka Verne).

So, awhile back I installed Tora on my Fedora 16 and here are the steps to do so:

First get the Tora sources from sourceforge.net . Download the source tar file and extract the same.

Install the delel for some of the packages that you will need:

sudo yum install qt-devel postgresql-devel qscintilla-devel

Also download and install the instantclient and the relevant devel package. You can download the same from the oracle site.

Now go to the directory where you extracted tora.

cd src
vi Makefile.am

Search for BUILT_SOURCES in that file and add moc_toawr.cpp in that section. This is what was required for tora version 2.3.1, not sure if you would need that…But there would be no harm in adding that anyways 🙂

After this the step is straightforward:

./configure
make
sudo make install

And you are done…..

Enhanced by Zemanta