stats.scott > alter database rename global_name to something.world;
Database altered.
stats.scott> select ora_database_name, sys_context('USERENV','DB_NAME') db_name from dual;
ORA_DATABASE_NAME DB_NAME ------------------------------ -------------------- SOMETHING.WORLD stats
1 row selected.
At 10:59 AM 9/11/2003 -0800, you wrote:
/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
Wolfgang Breitling Oracle7, 8, 8i, 9i OCP DBA Centrex Consulting Corporation http://www.centrexcc.com
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Wolfgang Breitling 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).