Re: show user command useful in sqlplus

From: Ari Likki <likkiar1_at_news.ougf.fi>
Date: 26 Sep 1994 02:26:55 -0100
Message-ID: <365f1vINN3f3_at_news.ougf.fi>


Denis Langlais (ag831_at_FreeNet.Carleton.CA) wrote:

: I find the "show user" command in sqlplus useful
: to tell me what I'm logged on as. However it would
: be nice to have a show dbname command to tell
: me what database I'm logged on. I know in
: unix that you can issue !echo $ORACLE_SID but this
: may not be reliable if your using sqlnet to another host.

I understand your problem completely.
We don't have more than two databases (test and prod) running in the same computer and made this decession that we don't connect to other database within the same SQL*Plus session. Then we use defferent command file to startup test and production SQL*Plus session. In these command files we set ENVironmental variable to point defferent LOGIN.SQL file in witch we set sqlprompt to either TEST_SQL> or PROD_SQL>. In this way you always know in witch database you are connected to.

These command files are also named as TEST and PROD.

With regards

Ari Likki
United Magazines Ltd
Helsinki
Finland   Received on Mon Sep 26 1994 - 04:26:55 CET

Original text of this message