Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: where is this GLOBAL_NAME value coming from?

Re: where is this GLOBAL_NAME value coming from?

From: Bib Endum <gd-newsgroups_at_spamex.com>
Date: Tue, 16 Mar 2004 16:31:04 -0500
Message-ID: <QmK5c.3552$Eb6.166829@news20.bellglobal.com>

"Ed Stevens" <nospam_at_noway.nohow> a écrit dans le message de news:a12e501dpkn4hpe47iilefmnvd9jr0sh2k_at_4ax.com...
> Server Platform: Oracle EE 9.2 on Solaris 8
> Client platform: Oracle 8.1.7 on Win2k
>
> On my desketop I have a login.sql file with the following:
>
> column global_name new_value gname
> set termout off
> select lower(user) || '@' ||
> decode(global_name, 'ORACLE8.WORLD', '8.0',
> 'ORA8I.WORLD', '8i',
> global_name) global_name from global_name;
> set sqlprompt '&gname> '
> set termout on
>
>

According to the dictionnary:
CREATE OR REPLACE FORCE VIEW SYS.GLOBAL_NAME(GLOBAL_NAME) AS SELECT value$ FROM sys.PROPS$ WHERE name = 'GLOBAL_DB_NAME';

The question is now: Where does this GLOBAL_DB_NAME comes from.

Was this database upgraded ? Copied ? Cloned ?

From Metalink bug:

a.. fact: Oracle Server - Enterprise Edition

a.. symptom: DB_NAME shows up incorrectly in data dictionary views

a.. change: The database name (DB_NAME) showed up incorrectly after making changes outlined in

a.. HOW TO DETERMINE AND CHANGE DB_NAME OR ORACLE_SID

NOTE ROLE: After update, the new database name shows up correctly in the view v$database.

Example
  select name from v$database;
  -Returns with new database name

Queries against some data dictionary views return with the old database name.

Example
  select database_name from sys.dual;
  -Returns with old database name

Example
  select * from props$
  where name = 'GLOBAL_DB_NAME';
  -Returns with old database name

a.. cause: The database name was not the same in all data dictionary views

fix:

To update the database name in all data dictionary views the following steps must be done.

  1. Check the database_name in both the initSID.ora and configSID.ora files and make sure both reflect new name.
  2. Change the global_name using the following sytax:

alter database rename global_name to database.domain;

The value held in dual for the database_name and the global_db_name in the props$ table comes from the global_name database parameter.

Now when querying database_name from dual and global_db_name from props$ the correct name is returned. Received on Tue Mar 16 2004 - 15:31:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US