Oracle Linux下使用sqlplus的edit命令

1.使当前会话生效

define_editor=vi
SQL> select * from dual;

D
-
X

SQL> edit
Wrote file afiedt.buf
21

  1* select * from dual
(这一步如果不能退出,使用ctrl+D) SQL> set _EDITOR=vi SP2-0158: unknown SET option "_EDITOR=vi" SQL> define_editor=vi SQL> ed Wrote file afiedt.buf 1* select * from dual SQL> ed Wrote file afiedt.buf 1* select 1 from dual SQL> / 1 ---------- 1 SQL>

2.默认生效

打开$ORACLE_HOME/sqlplus/admin/glogin.sql文件,在末尾添加一行:
define_editor=vi

 

posted @ 2019-05-15 16:06  酸奶加绿茶  阅读(517)  评论(0编辑  收藏  举报