Google it ....

Showing posts with label vi editor in SQL PLUS. Show all posts
Showing posts with label vi editor in SQL PLUS. Show all posts

Thursday, September 14, 2017

How to use vi editor in SQL PLUS

Here I'll show you how to use vi editor in SQL PLUS, It is very easy and comfortable when working with SQLPLUS and writing scripts.
vi is a screen-oriented text editor originally created for the Unix operating system.

Tempororay define editor in session level

SQL> define_editor=vi
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

  1* select * from dual
SQL> /

D
-
X

SQL>

To make permanent above settings for SQLPLUS utility you need to define it in $ORACLE_HOME/sqlplus/admin/glogin.sql and it will be effective for all session with sqlplus.

vi $ORACLE_HOME/sqlplus/admin/glogin.sql
define _editor='vi'