Difference between revisions of "Configure rlwrap"

From Ittichai Chammavanijakul's Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 42: Line 42:
 
</pre>
 
</pre>
  
* To use
+
* To use, for example,
  
 
<pre>
 
<pre>
SQL> select * from dba
+
SQL> select * from dba_mview
  
 
[tab] to complete
 
[tab] to complete
 +
 +
SQL> select * from DBA_MVIEW
  
 
[tab] [tab] to show all possible values
 
[tab] [tab] to show all possible values
 +
 +
SQL> select * from DBA_MVIEW
 +
DBA_MVIEWS                    DBA_MVIEW_DETAIL_SUBPARTITION
 +
DBA_MVIEW_AGGREGATES          DBA_MVIEW_JOINS
 +
DBA_MVIEW_ANALYSIS            DBA_MVIEW_KEYS
 +
DBA_MVIEW_COMMENTS            DBA_MVIEW_LOGS
 +
DBA_MVIEW_DETAIL_PARTITION    DBA_MVIEW_LOG_FILTER_COLS
 +
DBA_MVIEW_DETAIL_RELATIONS    DBA_MVIEW_REFRESH_TIMES
 +
 +
SQL> select * from DBA_MVIEW
 +
 
</pre>
 
</pre>
  
Line 58: Line 71:
 
Related Posts:
 
Related Posts:
 
* [[Install_Oracle_Instant_Client_on_Mac_OS_X]]
 
* [[Install_Oracle_Instant_Client_on_Mac_OS_X]]
 +
 +
== Configure rlwrap on Linux ==
 +
 +
* Download the latest from http://utopia.knoware.nl/~hlub/uck/rlwrap/
 +
 +
* Install as follows:
 +
<pre>
 +
gunzip rlwrap*.gz
 +
tar -xvf rlwrap*.tar
 +
cd rlwrap*
 +
./configure
 +
make
 +
make check
 +
make install
 +
</pre>
 +
 +
* If during the configure, you encounter "You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline) to build this program!", in addition to the "readline", you will also need the "readline-devel".
 +
<pre>
 +
# yum install readline-devel
 +
</pre>
 +
 +
References:
 +
* http://www.oracle-base.com/articles/linux/rlwrap.php
 +
* http://d-h-n.de/blog/rlwrap-you-need-the-gnu-readline-libraryftpftp-gnu-orggnureadline-to-build-this-program
 +
 +
[[Category: Unix]]

Latest revision as of 16:57, 3 July 2012

Configure rlwrap on Mac OS X

  • Install the downloaded package installation file.
  • During the installation, the package will update the profile file to include the following:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
  • So you may need to source the updated profile before proceed with rlwrap installation. Otherwise, when running to install the rlwarp, it may say that *port* is not found.
. ~/.bash_profile
  • Install rlwrap
$ sudo port install rlwrap
  • If it says that rlwrap cannot be found, try to get update first.
$ sudo port selfupdate
  • Once successfully installed, you now can use rlwrap, for example,
$ rlwrap sqlplus user@sid
  • Or you can create an alias for as a shortcut.
alias sqlplus='rlwrap sqlplus'
  • In addition, Tanel Poder has enhanced the rlwrap by having capability, in addition to recalling history, but also to search keywords in Oracle.
  • This is the sample. You can find out more from setup/README_rlwrap.txt file in the tpt_public.zip
alias sqlplus='rlwrap -D2 -irc -b'\''"@(){}[],+=&^%#;|\'\'' -f ~/Documents/Oracle_Scripts/tpt/setup/wordfile_11gR2.txt $INSTANT_CLIENT_PATH/sqlplus'
  • To use, for example,
SQL> select * from dba_mview

[tab] to complete

SQL> select * from DBA_MVIEW

[tab] [tab] to show all possible values

SQL> select * from DBA_MVIEW
DBA_MVIEWS                     DBA_MVIEW_DETAIL_SUBPARTITION
DBA_MVIEW_AGGREGATES           DBA_MVIEW_JOINS
DBA_MVIEW_ANALYSIS             DBA_MVIEW_KEYS
DBA_MVIEW_COMMENTS             DBA_MVIEW_LOGS
DBA_MVIEW_DETAIL_PARTITION     DBA_MVIEW_LOG_FILTER_COLS
DBA_MVIEW_DETAIL_RELATIONS     DBA_MVIEW_REFRESH_TIMES

SQL> select * from DBA_MVIEW

References:

Related Posts:

Configure rlwrap on Linux

  • Install as follows:
gunzip rlwrap*.gz
tar -xvf rlwrap*.tar
cd rlwrap*
./configure
make
make check
make install
  • If during the configure, you encounter "You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline) to build this program!", in addition to the "readline", you will also need the "readline-devel".
# yum install readline-devel

References: