Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UNIX-like prompt in SQL*PLUS
Thomas.Meyer wrote:
>
> Dear oraculars,
>
> I sometimes get confused when I have several SQL*PLUS sessions open,
> some connected to different instances on one host, some connected to a
> specific SQL*NET service.
>
> I would like to have the database/service that I'm connected to displayed in the SQL*PLUS prompt, like having the UNIX host name displayed in, say, the ksh prompt.
>
> Do you see a way of bringing the output of "select * from global_name" into the SQL*PROMPT, ideally whenever I do a new "connect"?
>
> When answering, please do a "CC" to Thomas.Meyer_at_dla-marbach.de
>
> Regards,
>
> --
>
> Thomas Meyer, EDV-Systemadministrator
I am not sure what your platform is, but I have been doing this in UNIX for years. I create a shells cript called plus, that does the following:
echo "set sqlp '$ORACLE_SID:SQL> '" > $HOME/p.sql $ORACLE_HOME/bin/sqlplus @$HOME/p
This will set the SQL prompt for the prd database (for example) to the text prd:SQL> .
Michael
+--------------------------------------------- + Michael Abbey Author of 5 works in the+ Ottawa Canada Oracle Press Series
+---------------------------------------------Received on Sat Sep 27 1997 - 00:00:00 CDT