четверг, 6 сентября 2012 г.

Using readline with Oracle SQL*Plus

This is repost of the following link:
http://blog.cachemiss.com/articles/Using%20readline%20with%20Oracle%20SQL*Plus.pod



By default, Oracle's SQL*Plus has no support for history, command line editing, etc.

This problem can be solved with the rlwrap utility. There is a Debian package, or you can easily compile it for any system.

Source is here: http://utopia.knoware.nl/~hlub/rlwrap/.

Once installed, add this alias to your .bashrc:

alias sqlplus="rlwrap -i -f ~/.sqlplus_history -H ~/.sqlplus_history -s 30000 sqlplus"

This defines a history file and uses it as your completion wordlist, and sets the history size to 30000 entries.

Before running it for the first time, do a:

touch ~/.sqlplus_history

That's all there is to it, and now you have readline support in your SQL*Plus!

Комментариев нет:

Отправить комментарий