Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Setting the prompt?

Setting the prompt?

From: Mark <mdas_at_slip.net>
Date: Thu, 08 Jul 1999 23:36:21 GMT
Message-ID: <01bec99a$d977b480$2bc2abcf@DTS14.slip.net>


We have oracle 8.0.5 using SQL*Plus to access the 2 databases. One database is named prod1 the other is named prod2. We have is so that, from the $ prompt we can type in '$sqlplus user1_at_prod1' which, after they supply the password, will put them into SQLPlus with the following prompt:
"PROD1.SQL>" {without the quotes}. Thus, the name of the database is part of the prompt.
However, we haven't been able to figure out how to change that prompt when we issue a connect command. So, if I say "connect user2_at_prod2" and supply the password, the prompt still says "PROD1.SQL>" even though it's not the prod1 database. Obviously, I'd like it to say "PROD2.SQL>"

I know you can get the name from the v$database. Is there a way you can feed that into a variable and put it as part of the prompt? Is there a way to do it at all?

In advance, thanks,
Mark
mdas_at_slip.net Received on Thu Jul 08 1999 - 18:36:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US