Home » Other » Client Tools » Previously executed block (Oracle 11gR2)
Previously executed block [message #481587] Thu, 04 November 2010 07:51 Go to next message
pointers
Messages: 451
Registered: May 2008
Senior Member
Hi,

Can you please tell, is there a way to get previously executed block of code from sql*plus (command line) not using arrow keys.

I am using windows command line to do this.

I have executed a block of code ( anonymous block) which got to have 40 lines of code, after which I have executed some other commands. Now i need to get the code of the block (40 lines) which i executed.

Is there a way to do this.

Regards,
Pointers
Re: Previously executed block [message #481595 is a reply to message #481587] Thu, 04 November 2010 08:31 Go to previous messageGo to next message
Littlefoot
Messages: 21811
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, no way (unless CMD's buffer is large enough so that you could scroll up and "save" 40 lines of code using the copy/paste technique).
Re: Previously executed block [message #481597 is a reply to message #481587] Thu, 04 November 2010 08:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68653
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
have executed a block of code ( anonymous block) which got to have 40 lines of code, after which I have executed some other commands. Now i need to get the code of the block (40 lines) which i executed.


SQL> begin 
  2    null;
  3  end;
  4  /

PL/SQL procedure successfully completed.

SQL> l
  1  begin
  2    null;
  3* end;

You can get it only JUST after execution as you can get ONLY the last one.

Regards
Michel

[Updated on: Thu, 04 November 2010 08:34]

Report message to a moderator

Re: Previously executed block [message #481601 is a reply to message #481597] Thu, 04 November 2010 08:45 Go to previous message
pointers
Messages: 451
Registered: May 2008
Senior Member
Thanks Little foot and Micheal...
Previous Topic: how to tweak SQL*Plus to change the way line numbers are displayed
Next Topic: TOAD Data Extract Excel 2007
Goto Forum:
  


Current Time: Wed May 22 21:55:49 CDT 2024