History of sqlplus commands [message #455827] |
Thu, 13 May 2010 02:40 |
prejib
Messages: 126 Registered: March 2009 Location: India
|
Senior Member |
|
|
How do I retrieve the history of commands(using up/down arrow) I ran in a sqlplus session in unix platform like in windows platform?
|
|
|
|
|
Re: History of sqlplus commands [message #455842 is a reply to message #455839] |
Thu, 13 May 2010 03:24 |
|
ramoradba
Messages: 2456 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
Quote:History function
Unfortunately, there is no built in history functionality in SQL*PLUS that would allow to go back a number of commands issued in SQL*PLUS.
However, there is gqlplus (on sourceforge) that enhances sql plus with a history functionality. With cygwin (as apparently also with linux and possibly other Unix variants),
rlwrap can also be used.
SQL*Plus is then called like $ rlwrap sqlplus user/password@sid. rlwrap is a wrapper around readline. On HP-UX, one can call sql*plus from ied (something like ied sqlplus usr/pass@srv There seems also to be an ied equivalent in perl: feb.tar.gz
On windows, the function key F7 gets a list of previously executed commands. Also, if a letter is already entered, it gets the list with commands starting with that letter. Also the arrow keys work.
Note: This works only with the command line sqlplus (sqlplus.exe), not with the gui version (sqlplusw.exe). On emacs, M-x sql-oracle does the trick. On 9i, iSQL Plus seems capable of exactly this.
http://prutser.files.wordpress.com/2008/12/sqlplus_forgotten_history.pdf
http://www.adp-gmbh.ch/ora/sqlplus/index.html
you can press F7 key also ..for unix see the links..
And please search before posting...
sriram
|
|
|
|