How the Oracle command prompt appears as a user name
For example: Sqlplus/as sysdba After the command prompt is sys>
Fang Yi: Temporarily modify the sqlplus configuration variable
Sql> Show User
--The output is the current user, take the SYS as an example
User is "SYS"
Sql> Show All
--See all environment variables to find Sqlprompt
Sql> set Sqlprompt "_user>"
Sys>
Note: This setting only works in this reply.
Square Two: Modify the Sqlplus configuration file to achieve global validity in all sessions
CD $ORACLE _home
CD Sqlplus/admin
VI Glogin.sql
Add on the last side
Set Sqlprompt "_user>"
Note: Glogin.sql is a SQL configuration file, you can set the line length, page capacity, column width automatically adapt
Set Linesize #设定行长度80
Set PageSize #设定页面容量
DEFINE _editor= ' vi ' #修改sqlplus edit to open a text editor with VI
Set Serveroutput on #设定列宽自动适应
Oracle Post-Installation perfect 2-2 sqlplus configuration variable command prompt How to display as user name