问题描述
例如,要显示....
USER@SID >
我认为这可能对一些人有帮助,所以我也要回答!
I thought this was potentially helpful to a few people so I'm going to answer it too!
推荐答案
修改$ ORACLE_HOME \ sqlplus \ admin \ glogin.sql脚本-添加:
Amend your $ORACLE_HOME\sqlplus\admin\glogin.sql script - add:
set sqlprompt "_user '@' _connect_identifier > "
到文件末尾.
在Oracle 10g中,每次发出"conn"命令时,此设置都会正确更改.对于10g之前的客户端,当您执行"conn"操作时,它不会更改,但将保留为您首次连接的用户名/数据库.
In Oracle 10g this will change correctly each time you issue a "conn". For clients before 10g it won't change when you do a "conn" but will remain as the username/db you first connected to.
您还可以将_date用作当前日期,并将_privilege用作所连接用户的特权(例如SYSDBA).
You can also use _date for the current date and _privilege for the privilege (eg SYSDBA) of the connected user.
参考:
http://www.acs.ilstu. edu/docs/Oracle/server.101/b12170/whatsnew.htm
这篇关于在SQL * Plus中,如何更改提示以显示已连接的用户和数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!