afiedt.buf problems

October 6, 2009 at 9:00 pm (Oracle) (, , )


Many of us would be used to using ed on sqlplus.

This example is on linux (OEL 5.3)

Problem might be that when you type ed you get “Wrote file afiedt.buf” on the terminal screen

but there would be no afiedt.buf file popup or open.

To fix this issue, open sqlplus and then type

SQL> set editfile “/home/oracle/afiedt.buf”

SQL> define _editor=vi

Also check the permissions of the directories mentioned below:

[root@OEL5 oracle]# ls -ld /home
drwxr-xr-x 3 root root 4096 Sep 22 13:50 /home

[root@OEL5 oracle]# ls -ld /home/oracle/
drwx—— 10 oracle oinstall 4096 Sep 29 13:57 /home/oracle/

[root@OEL5 oracle]# ls -l /home/oracle/afiedt.buf
-rwxr–r– 1 oracle oinstall 373 Sep 29 13:57 /home/oracle/afiedt.buf

If you prefer to use gedit instead of vi, open a terminal window and login as root. As root, type xhost +

Once you give xhost + as root, open a new window and login as oracle

and now type xeyes orĀ  xclock , xeyes or xclock should pop up, which should not have been possible earlier.

[root@OEL5 oracle]# xeyes

[root@OEL5 oracle]# xclock

now login into sqlplus as oracle and then on sqlplus define _editor=gedit

SQL> define _editor=gedit

This would not work if xhost + is not set. This would continue to work until you set xhost – or

you reboot the server. So xhost + as root whenever required.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: