Home » Other » Client Tools » History of sqlplus commands (Oracle 10g, Unix)
History of sqlplus commands [message #455827] Thu, 13 May 2010 02:40 Go to next message
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 #455837 is a reply to message #455827] Thu, 13 May 2010 03:14 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps it is not possible; SQL*Plus on OpenVMS didn't have such an option. Quite annoying, I agree.
Re: History of sqlplus commands [message #455839 is a reply to message #455827] Thu, 13 May 2010 03:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can use the arrow ONLY in DOS sqlplus.exe not Windows one (sqlplusw.exe).

Regards
Michel
Re: History of sqlplus commands [message #455842 is a reply to message #455839] Thu, 13 May 2010 03:24 Go to previous messageGo to next message
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 Smile
Re: History of sqlplus commands [message #455844 is a reply to message #455842] Thu, 13 May 2010 03:27 Go to previous message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
http://prutser.wordpress.com/2009/01/17/command-line-tools-and-history/

http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap-to-get-a-command-history-in-sqlplus/
i guess this is enough
sriram Smile

[Updated on: Thu, 13 May 2010 03:28]

Report message to a moderator

Previous Topic: Spooling Output in Windows
Next Topic: how to activate my desktop panel
Goto Forum:
  


Current Time: Thu Apr 18 11:57:47 CDT 2024