Use the edit command of sqlplus in Linux

Source: Internet
Author: User

SQL> edit

Wrote file afiedt. buf

40

As shown in the preceding figure,

After setting vi as the default editor, there is no problem:
SQL> set _ EDITOR = vi
SQL> ed

However, in this case, I only set session settings, which will expire after re-login. If you want to save the configuration, you can save the editor settings to the configuration file and use the configuration automatically each time.
Modify the $ ORACLE_HOME/sqlplus/admin/glogin. SQL configuration file and add define _ editor = vi. When sqlplus is started, it will read the glogin. SQL script.

In Linux sqlplus, if you use edit to edit the current script, the default editor ed is called. If you want to use vi as the default editor, you can edit the file $ ORACLE_HOME/sqlplus/admin/glogin. SQL, add the following lines

DEFINE _ EDITOR = vi
After sqlplus is restarted, vi is called as the editor when the edit command is run. When sqlplus is started, $ ORACLE_HOME/sqlplus/admin/glogin is run first. SQL, so we can also set other variables in this file

Author: Tan

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.