Global_name and dbdomain in Oracle

Source: Internet
Author: User
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.

    ,

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.