phpmyadmin access problem and change server from URL

2012-09-30 1 min read Database Fedora

I was having issues with one of the phpmyadmin setups. The first server defined in the config file was not accessible and the theme that I was using was not allowing me to change the server from the first page. This resulted in a state where I was not able to access phpmyadmin in any way. I could not connect to any of the servers. And thus had to hack my way in to phpmyadmin to find out how to connect to other servers from URL. And here is my finding:

Continue reading

gqlplus – sqlplus with readline (tab completion)

2012-08-03 1 min read Database

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

tora installation on Fedora 17.

2012-06-22 1 min read Database Fedora

Here are the previous links on Tora:

Tora on F16

Tora on Fedora

And if you are interested in installing from source then you can always use this link:
http://blog.amit-agarwal.com/2012/02/06/tora-fedora-16-mysql-oracle/

 

And if you are interested in just installing it then you can always do:

rpm -ivh "http://amit-agarwal.co.in/mystuff/tora-2.1.3-1.fc17.i686.rpm"
Enhanced by Zemanta

Oracle Select the top 5 queries

2012-02-27 1 min read Database

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

2012-02-09 1 min read Database Fedora
[TOra][1]
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.

2012-02-06 1 min read Database Fedora

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.

Continue reading

mysql output to an array for easy parsing.

2011-05-11 2 min read Bash Database

 

Today I was looking for some way to put the output of the mysql output in an array in a bash script. Quick google search yeilded to results something like this:

 

  <td>
    <div class="text codecolorer">
      output=$(mysql -e "select * from table")
    </div>
  </td>
</tr>
1

The problem with the above approach is that all the words go into separate index. So if you have a line that has space then that is split into multiple index’s. Not good…

Continue reading
Older posts