Jumat, 18 Desember 2009

Oracle sqlplus typing history and typing completion on Linux

Something that annoy me so much when using oracle sqlplus in Linux is unavailability of typing completion and history. When we make some typing mistake, we must retype whole command. We cannot use up or down arrow to call typing history. We also cannot use tab for some completion help. Yeah I know most of people don't type directly on sqlplus. They write the script use some text editor, vi, emacs or notepad. Later they just use sqlplus to call the script. But if there are some people that has made life easier by provide that lack feature we don't have reason to refuse.

Introducing gqlplus a utility which provide typing completion and history to sqlplus. You can download from http://sourceforge.net/projects/gqlplus/. Extract the file then do configure and make. The library that I have to provide is ncurses as prerequirement. I just call sudo apt-get install libncurses5. Later I copy the gqlplus folder to my oracle user home directory. I edit .bash_profile file in oracle user home directory and add gqlplus directory to PATH environment variable. After all I just call gqlplus from terminal and I have sqlplus with history and completion support now.

Tidak ada komentar: