Global_name, dbdomain, and alterdatabaserenameglobal_nametoxx in Oracle do not affect the db_domain parameter, but g is used when dblink is created.
In Oracle, global_name and db domain, alter database rename global_name to xx does not affect the db_domain parameter, but g
Global_name and db domain in Oracle
DetermineCurrent DatabaseGlobal name:
CONNECTSYSTEM@Sales.Us.Example.Com
GLOBAL_NAME;
GLOBAL_NAME
----------------------------------------------------------------------------
SALES.US.EXAMPLE.COM
2. You query the V $ PARAMETERView ToDetermineCurrentSettingForThe DB_DOMAIN initialization parameter:
V $ PARAMETER
NAMEVALUE
--------------------
Db_domain US.EXAMPLE.COM
3. You a partially-Specified global name:
TheDatabaseExpands the globalDatabaseNameForThis linkByAppending the domain partOfThe globalDatabaseNameOfThe localDatabase ToThe nameOfTheDatabaseSpecifiedInThe link.
4. You query USER_DB_LINKSToDetermine which domain nameDatabaseUsesToResolve the partially specified globalDatabaseName:
SELECTDB_LINKFROMUSER_DB_LINKS;
DB_LINK
------------------
HQ.US.EXAMPLE.COM
This result indicates that the domain partOfThe globalDatabaseNameOfThe localDatabase IsUs.Example.Com.TheDatabaseUses this domainInResolving partialDatabaseLink names whenDatabaseLinkIsCreated.
5. Because you have already ed word that the salesDatabaseWill moveToJapan,YouRenameThe salesDatabase ToSales.Jp.Example.Com:
GLOBAL_NAMETOSales.Jp.Example.Com;
GLOBAL_NAME;
GLOBAL_NAME
----------------------------------------------------------------------------
SALES.JP.EXAMPLE.COM
6. You query V $ PARAMETER again changed,Although you renamed the domain partOfThe globalDatabaseName:
V $ PARAMETER
NAMEVALUE
--------------------
Db_domain US.EXAMPLE.COM
This result indicates that the GLOBAL_NAME statementthe DB_DOMAIN initialization parameter
7. You query USER_DB_LINKSToSee howDatabaseResolves the domain partOfThe globalDatabaseNameOfSupply:
SELECTDB_LINKFROMUSER_DB_LINKS;
DB_LINK
------------------
HQ.US.EXAMPLE.COM
SUPPLY.JP.EXAMPLE.COM
This result indicates thatDatabaseDoesNotUse the DB_DOMAIN initialization parameter setting when resolving the partial link name.
8. YouThenReceive word that your previous information was faulty:Sales will beInThe ASIA.JP.EXAMPLE.COM domain, NotThe JP.EXAMPLE.COM domain.Consequently,YouRenameThe globalDatabaseNameAsFollows:
GLOBAL_NAMETOSales.Asia.Jp.Example.Com;
GLOBAL_NAME;
GLOBAL_NAME
----------------------------------------------------------------------------
SALES.ASIA.JP.EXAMPLE.COM
You query V $ PARAMETERToAgainCheckThe settingForThe parameter DB_DOMAIN:
V $ PARAMETER
NAMEVALUE
---------------------
Db_domain US.EXAMPLE.COM
The result indicates that the domain setting statements.
9. Finally,YouCreateA linkToThe warehouseDatabase AndAgain query USER_DB_LINKSToDetermine howDatabaseResolves the partially-Specified global name:
SELECTDB_LINKFROMUSER_DB_LINKS;
DB_LINK
------------------
HQ.US.EXAMPLE.COM
SUPPLY.JP.EXAMPLE.COM
WAREHOUSE.ASIA.JP.EXAMPLE.COM
Again,You see thatDatabaseUses the domain partOfThe globalDatabaseNameOfThe localDatabase ToExpand the partial link name during link creation.
Therefore, alter database rename global_name to xx does not affect the db_domain parameter, but uses global_name instead of db_domain when creating the db link.
,