Re: How to identify the 'current' instance

From: g wayne nichols <gwn_at_cyber3.servtech.com>
Date: 1996/10/15
Message-ID: <540ees$q07_at_cyber3.servtech.com>#1/1


In <slrn565dvj.7qh.roby_at_h2net.net> roby_at_h2net.net (Roby Sherman) writes:

>In article <53u9au$i7d_at_gw.PacBell.COM>, j4xprel_at_pbsrv10.isp.pacbell.com wrote:
>>running under hp-ux, after exporting ORACLE_SID=TST, TWO_TASK=DEV and
>>then logging on to sql*plus with 'sqlplus user_id_at_T:host_name:PRD' is
>>there any way to query the correct current instance?
>>
>>thanks in advance.
>>
 

>select global_name from global_name;
 

>This will report back the global_name of the current database.

If your version of Oracle doesn't have a global_name table, try:
  select value from v$parameter where name = 'db_name';

-- 
------------------------------------------------------------------------------
Computer General		Rochester, NY			(716) 436-6372
      "... providing general computer solutions to specific business problems"
                              gwn_at_servtech.com
Received on Tue Oct 15 1996 - 00:00:00 CEST

Original text of this message