Re: How do I define_editor in SQL*Plus permanently?

From: Brian Peasland <peasland_at_email.msn.com>
Date: Mon, 26 Jul 1999 20:33:35 -0500
Message-ID: <OyiGSA91#GA.360_at_cpmsnbbsa03>


Vernon Adams wrote in message <379CF72D.53F676A8_at_ezgov.com>...
>I know this is probably a truly lame question, but I cannot find the
>answer in the "fine manual".
>
>How do I set the editor (via define_editor) and have the value retained
>across sessions of
>using SQL*Plus? In other words, when I use SQL*Plus tomorrow, the
>define_editor command
>will not need to be done again?

There are two ways to do this. There are two files which can help you. One is called GLOGIN.SQL and can be placed in $ORACLE_HOME/sqlplus directory (I believe). Refer to SQL*Plus documentation to find the exact location. The other file is called LOGIN.SQL and can be placed in any subdirectory you want.

When anyone starts sqlplus, the contents of the GLOGIN.SQL file will be executed before control is given to the user. GLOGIN can be thought of as a "global" login file. You can place the define command in this file and when anyone starts sqlplus, the editor will be set up for them.

After the GLOGIN.SQL file is executed (if it exists), the system will look in the directory that sqlplus was started from for a LOGIN.SQL file. It will then execute the contents of that file. This lets one define their own settings whereas the previous method lets one define system wide default settings. The LOGIN.SQL file will override any duplicate commands from the GLOGIN file. One caveat, if you start sqlplus from a directory that does not have this file, it will not be executed.

Hope that helps,
Brian Peasland
peasland_at_msn.com Received on Tue Jul 27 1999 - 03:33:35 CEST

Original text of this message