David Wagoner <[EMAIL PROTECTED]> wrote:
You might get some surprising results from SELECT ORA_DATABASE_NAME FROM DUAL; (see below). I have a DEV database cloned from Prod. and it still lists the Prod. DB name with that query. Where is it reading the name from? You can see that other queries produce the "correct" name.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
dmedi01SQL> show parameter name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string dmedi01
global_names boolean FALSE! FONT>
instance_name string dmedi01
lock_name_space string
log_file_name_convert string
oracle_trace_collection_name string
oracle_trace_facility_name string oracled
plsql_native_make_file_name string
service_names string dmedi01.arsenaldigital.comSQL> select ora_database_name from dual;
ORA_DATABASE_NAME
--------------------------------------------------------------------------------
PMEDI01.ARSENALDIGITAL.COM
Best regards,
David B. Wagoner
Database Administrator
Arsenal Digital Solutions
-----Original Message-----
From: GovindanK [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 10, 2003 10:00 PM
To: Multiple recipients of list ORACLE-L
Subject: Re: how can I see which database I am logged into without
How about SELECT ORA_DATABASE_NAME FROM DUAL;
HTH
GovindanK> select sys_context('USERENV','DB_NAME') from <anytable>;
>
> At 10:49 AM 9/10/2003 -0800, you wrote:
>>hi.
>>
>>I think there was a dbms package to get some of
>>the environment variables for a session, but I can't
>>remember anyhting specific. If someone know what I'm
>>talking about and has any details, please Email me or
>>post here
>>
>>thanks
>>
>>Gene
>
> Wolfgang Breitling
> Oracle7, 8, 8i, 9i OCP DBA
> Centrex Consulting Corporation
&! gt; http://www.centrexcc.com
>
>
>--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: GovindanK
INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software