Thursday, August 30, 2012

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

Solution of SP2-0110: Cannot create save file "afiedt.buf": [How to Solve]

After completion of Oracle 10g or 11g on your Windows 7 computer, you would like to practice the Oracle SQL in Oracle SQL*Plus. Definitely you can do it but sometimes you mistake to write the full command correctly. But what do you do? Generally you would like to use the ed or edit command from the Oracle SQL*Plus prompt and like to correct the errors of your SQL syntax. But you can not do. You are getting the error message like SP2-0110: Cannot create save file "afiedt.buf". Most people, who are using Oracle in Windows 7 operating system, get this error message firstly. But how to solve it. Hopefully, you already searched lots of place for the solution of this. You may get lots of articles or lots of documents to solve this simple error but you could not solve the error totally. The good news is that, you will find the complete and easy solution here to solve the problem or error SP2-0110: Cannot create save file "afiedt.buf" in the following paragraphs.
Cannot create save file afiedt.buf
The cause of of the error SP2-0110: Cannot create save file "afiedt.buf" occurs due to the problem of Oracle installation destination or directory permission . But this can be easily solved following the mentioned steps:
  1. Create a folder in any place of your computer. For example, we create a folder in G directory and named it as MyOracle folder.
  2. Go to the Oracle installation directory and browse through the bin directory to find out the sqlplusw file. For example, the installation location of Oracle 10g is G:\oracle\product\10.2.0\db_1\bin in our computer. So, we have to go there and find out sqlplusw file. Now, copy a shortcut of this file and copy the shortcut and past it to the folder which we created in step 1.
  3. Let’s try this by double clicking and type the sql commands. Now, type ed or edit command and hit Enter key of your keyboard. What you are seeing? Is there any error? No error at all and the edit prompt to modify the command is opened to a notepad or any other text editor.
And that’s all. Hopefully, following the above mentioned steps you can easily remove the error SP2-0110: Cannot create save file "afiedt.buf" and can easily edit the commands. Moreover, if you face any other difficulties then please mention in the comment section and I will try to solve that problem.

22 comments:

Udaya said...

Thank you soooo much....
I tried a lot...
but only yours is very simple and worked for me easily....
Thanks a lot again..

VijayaBhaskaraReddy.Vatte said...

Sir,I have no any sqlplusw.exe file in the specifed BIN directory.Then what should I do?

Unknown said...

just click on file and then click on save and save your database file in your desired directory and click save and then try to edit the command by using 'ed'
hopefully it will works if you r using 9g or 10g

Unknown said...

sir pls add any post for "Installation of Application Server 10g"

InduG said...

Hi Shahid thank you very much I was trying to fix this problem and tryed everything nothing works. It was so simple but little bit confusing because I do not have file sqlplusw in my bin folder what I did I copied my sqlplus file and pasted in other folder and by double clicking it works fine.
Thank you again.

منتدى العلوم said...

THANK YOU SO MUCH

jan said...

hey i cannot find the sqlplusw in bin :( please help

Unknown said...

I have no any sqlplusw.exe file in the specifed BIN directory.Then what should I do?

Narendra kumar said...

sp2-0110 cannot create save file afiedt.buf IN ORACLE 11G ON WINDOWS7

J0M0D0 said...

No me funcionon :/

Nazneen said...

i could not find sqlplusw in my bin of 11g database... pls help

ksubbareddy said...
This comment has been removed by the author.
Shahid ul Ghani said...

\app\Administrator\product\11.2.0\dbhome_1\BIN

You can find sqlplus from the above directory in oracle 11g

Unknown said...

Nice one dude, It's working for me and thanks for your blog.

Unknown said...

Actually in my case the file was named as sqlplus instead of what you mentioned as sqlplusw. Just a general info if someone has problem finding the file.

Suresh said...

why u r using these command.....so simple in u r work
SQL>set editfile d:/sqledit.sql

Shahid ul Ghani said...

I appreciate if you guys share your comments as well.

Shahid ul Ghani said...

Suresh thanks for your comments. A little bit detail of set editfile d:/sqledit.sql command.


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.

Unknown said...

thank you sir it is working
thank you very much for valuable information it is working

말랑말랑 said...

thank you sir!
you wrote to find the sqlplusw.exe. My directory has only sqlplus.exe. but it good job, too!!

Tuhin said...

Thanks a lot Shahid Ul Ghani & Suresh sir.

Dharmanand said...

mine is 11g where sqlplusw file will not be there