Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Setting the prompt?
Hi, Mark.
I use a solution like John Strange has illustrated, but from a SQL script. So when I want to connect to my DEV database as APPS, I run: @con_apps
con_apps.SQL contains:
PROMPT * Setting you up as APPS in DEV. Please wait...
CONN apps_at_dev
--here I am prompted for the APPS password
@login
PROMPT * Okay, it's all yours now.
My login is similar to his. This just makes the connection process very simple.
Chris
Mark wrote:
> 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 Fri Jul 09 1999 - 09:37:11 CDT
![]() |
![]() |