I, from time to time, get stuck in ‘ed‘ on SQL*Plus because the editor not defined like this:
SQL> select * from duall; select * from duall * ERROR at line 1: ORA-00942: table or view does not exist SQL> ed Wrote file afiedt.buf 22 ^C ? ^Z ?
The Ctrl-C and Ctrl-Z, wouldn’t get you out.
The solution is simple, type ‘q‘ and press ‘Enter‘, then set editor using ‘define_editor=vi‘ and try again 🙂 :
q 1* select * from duall SQL> define_editor=vi SQL> ed Wrote file afiedt.buf 1* select * from dual SQL> / D - X SQL>
If you found this blog post useful, please like as well as follow me through my various Social Media avenues available on the sidebar and/or subscribe to this oracle blog via WordPress/e-mail.
Zed DBA (Zahid Anwar)
4 thoughts on “How to exit out of ed in SQL*Plus”
Sharing knowledge is a very blissful thing. Please continue this. It helps lot of students DBAs. Thank you 🙂
LikeLiked by 1 person
You’re welcome 🙂
I’m glad you find it useful.
hello sir i am using sql plus when i type ed command the edition doesn’t open and it says “Wrote file afiedt.buf” so please help me to come out;
Which operating system? If it’s Linux, did you type define_editor=vi as stated in the blog post?