/u005/oracle/product/rdbms/admin> ls -l dbmstrig.sql
-rw-r--r--   1 oracle   dba         8657 Apr 28  2002 dbmstrig.sql

/u005/oracle/product/9.2.0/rdbms/admin> sed -n '76,85p' dbmstrig.sql
Rem returns the current database name
create or replace function database_name return varchar2 is
begin
return dbms_standard.database_name;
end;
/
grant execute on database_name to public
/
create or replace public synonym ora_database_name for database_name
/

/u005/oracle/product/9.2.0/rdbms/admin> 

HTH
GovindanK

On Thu, 11 Sep 2003 05:39 , Hately, Mike (LogicaCMG) <[EMAIL PROTECTED]> sent:

>Hi,
>this statement returns the GLOBAL_NAME value rather than the database name. 
>Admittedly the 2 should usually be the same but often (following a database
>clone for instance) it is not correctly set.
>
>Regards,
>Mike Hately
>
>----- Original Message ----- 
>To: "Multiple recipients of list ORACLE-L" [EMAIL PROTECTED]>
>Sent: Thursday, September 11, 2003 4:59 AM
>
>
>> How about SELECT ORA_DATABASE_NAME FROM DUAL;
>> 
>> HTH
>> GovindanK
>
>
>
>> 
>> > select sys_context('USERENV','DB_NAME') from ;
>> >
>> > 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
>> > http://www.centrexcc.com
>
>
>********************************************************************************************
>E mail Disclaimer
>
>You agree that you have read and understood this disclaimer and you agree to be bound 
>by its terms.
>
>The information contained in this e-mail and any files transmitted with it (if any) 
>are confidential and intended for the addressee only.  If you 
have received this  e-mail in error please notify the originator.    
>
>This e-mail and any attachments have been scanned for certain viruses prior to 
>sending but CE Electric UK Funding Company nor any of its 
associated companies from whom this e-mail originates shall be liable for any losses 
as a result of any viruses being passed on.
>
>No warranty of any kind is given in respect of any information contained in this   
>e-mail and you should be aware that that it might be 
incomplete, out of date or incorrect. It is therefore essential that you verify all 
such information with us before placing any reliance upon it.
>
>CE Electric UK Funding Company
>Lloyds Court
>78 Grey Street
>Newcastle upon Tyne
>NE1 6AF
>Registered in England and Wales: Number 3476201
>
>********************************************************************************************
>
>-- 
>Please see the official ORACLE-L FAQ: http://www.orafaq.net
>-- 
>Author: Hately, Mike (LogicaCMG)
>  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).



---- Message sent via Zuvio Mail
Get your own FREE email account with SPAM and Antivirus protection!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Govindan K
  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).

Reply via email to