Re: which server am I on?

From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1996/12/19
Message-ID: <32B9736D.4B94_at_teldta.com>#1/1


L. Tseng wrote:
>
> Is there an easy way to tell what server your are on in a SQL*Plus
> session? How about the way to show the database/instance for the
> session? I found myself frequently confused over having serveral
> sql*plus sessions connecting to different Oracle servers (local,remote)
> and instances.
>
> Thanks,
>
> Leslie

[Quoted] In the following example the machine name is "pythia", the user name is "oracle". Note the prompt once SQL*Plus is invoked. Hope this helps....

[pythia:oracle]: cat $ORACLE_HOME/sqlplus/admin/glogin.sql rem glogin.sql
rem
rem SQL*Plus global login startup file. rem
rem This is the global login file for SQL*Plus. rem Add any sqlplus commands here that are to be rem executed when a user invokes sqlplus rem
set termout off
column glogin_prompt noprint new_value _glogin_prompt select substr(program,instr(program,'_at_')+1,instr(program,' ')-instr(program,'@')-1)||':'||value glogin_prompt from v$parameter,v$process where program like '%SMON%' and name='db_name'; set sqlprompt 'SQL_at_&_glogin_prompt> ' set termout on

[pythia:oracle]: sqlplus /
SQL*Plus: Release 3.2.3.0.0 - Production on Thu Dec 19 08:37:15 1996 ---snip---
SQL_at_pythia:jmp> exit
[pythia:oracle]:

-- 
                       \\|//
                       (0-0)
           +-----oOO----(_)-----------+
           | Brian P. Mac Lean        |
           | Database Analyst         |
           | brian.maclean_at_teldta.com |
           | http://www.teldta.com    |
           +-------------------oOO----+
                      |__|__|
                       || ||
                      ooO Ooo
Received on Thu Dec 19 1996 - 00:00:00 CET

Original text of this message