SP2-0110: Cannot create save file "afiedt.buf"

Any query/command (single line or multiple line) we execute resides in the buffer temporarily and it is lost when we execute new query/command because new one takes that place.

In case we try to edit that query/command which is in the buffer we get an error "SP2-0110: Cannot create save file "afiedt.buf"".

There are many ways to fix this, I'm going to show you three different ways.


1. Always run the SQL Command Line as administrator.



Once you start this way, you will not see said error.


2. Sometimes we get this error message because we don't have write permission on the current directory. Either start sqlplus from a different directory, or change the editfile entry in sqlplus:

SQL>set editfile d:/sqledit.sql

In above code, you can use any drive for this and any file name.

3. Create sqledit.sql file and save it in bin directory (sometimes this file misses cause this error) of oracle where sqlplus.exe is resides.Then run sql command line as administrator.

Comments

  1. man it really worked thanks alot

    ReplyDelete
  2. working correctly .. thanks a lot
    Deepa

    ReplyDelete
  3. Works a treat, thanks mate!

    ReplyDelete
  4. bt we need to write it evry time we open sqlplus..how to avoid it.?

    ReplyDelete
  5. Thanks a lot bro you really help me :)

    ReplyDelete
  6. 1. Open Cmd
    2. type set editor=notepad
    3. type sqlplus & login and open notepad

    ReplyDelete
  7. 1. Open Cmd
    2. type set editor=notepad
    3. type sqlplus & login and open notepad

    ReplyDelete
    Replies
    1. I want to set the editor permanently for the Oracle Sqlplus. The above steps are working at cmd prompt and not for sql .

      Delete
  8. its not working for me when I am trying to set for Oracle Sqlplus

    ReplyDelete
  9. I dont want to enter "set editfile d:/sqledit.sql " each time i open sqlplus ..how do I make this permanent? Thank you for the knowledge ,,it's working though not permanent.

    ReplyDelete
    Replies
    1. same case with me.. i have to enter this each time.. how do i make this permanant? have u got any solution for this?? plz let me know if yes..

      Delete
  10. same case with me.. i have to enter this each time.. how can it be permanent?? have u got any soln for this?? plz let me know if yes..

    ReplyDelete
  11. Now working fine, Thanks bro

    ReplyDelete
  12. Hi Boss,
    when i use ed command in sql command prompt a note pad is opening but it was saying "cannot find the /.sql file"...iam unable to see the queries too...please help me to fix this

    ReplyDelete
    Replies
    1. I have provided 3 resolutions above. You are trying to execute ed or edit buffer command..right? If so, the 1st resolution will work well for you. 2nd resolution only works till current session. 3rd resolution will work permanently but this helps when you have no sqledit.sql at the location (your location might be different depending on version you have installed) C:\oraclexe\app\oracle\product\11.2.0\server\BIN\

      Delete
  13. Hi please help me...iam uable to open the queries with ed command...it was opening a note pas file but showing "cannot fine /.sql file"

    please help me

    ReplyDelete
  14. Thank you,, it works....

    ReplyDelete
  15. open a notepad and save it as "sqledit.sql" in the sqlplus.exe contating directory (in case unable to found search in start button).Then run sqlplus as admin

    ReplyDelete

Post a Comment

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System