3 Ways to Invoke / Open Vi Editor by ed Command in SQLPLUS

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Generally, SQLPLUS takes the default editor by the OS. You can bypass the OS default editor using following settings. There are 3 option to set vi as the editor for the sqlplus command. 

Option 1: 

define_editor=’vi’ - Temporary for each sqlplus session

 
SQL> define_editor='vi'
SQL> ed
Wrote file afiedt.buf

  1* select name from v$database

Option 2: 

Make above setting permanent for the sqlplus utility by adding settings in $ORACLE_HOME/sqlplus/ admin/glogin.sql file. Once you add this entry in glogin.sql file it will be affective for all the sessions.

 
vi $ORACLE_HOME/sqlplus/admin/glogin.sql
define _editor='vi'
advertisements
 
Option 3: 

Set the default edit as vi in the unix environment.

$ export EDITOR="vi"
$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 22 05:02:28 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name from v$database;

NAME
---------
ORCLTEST

SQL> ed
Wrote file afiedt.buf

  1* select name from v$database

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer