ORACLE数据库中Global Database Name与DB LINKS的关系还真是有点纠缠不清,在说清楚这个关系前,我们先来了解一下Global Database Name的概念

 

Global DataBase Name 概念

1. What is a global database name?

-------------------------------------------------------------------------------

The global database name is the unique name of the database. In a distributed

database system (a set of databases stored on multiple computers that typically

appears to applications as a single database) the global database name ensures

that each database is distinct from all other databases in the system. Oracle

forms a database's global database name by prefixing the database's network

domain with the individual database's name. For example: sales.us.oracle.com

and sales.uk.oracle.com.

The global database name defaults to DB_NAME.DB_DOMAIN and this value is marked

at database creation time. If you change the DB_NAME or DB_DOMAIN after the

database has been created, the value for the global database name (GLOBAL_NAME)

will not change.

说简单一点,global database name就是用来唯一标识数据库的东东。global database name由两部分组成,DB_NAME和DB_DOMAIN。在创建db link的时候,Oracle会自动将db_domain作为后缀添加上去。而且一旦加入就很难变更。所以在进行高级复制、Streams复制等配置时,最好首先将多个节点的global_name规划好。

 

如何查看Global Database Name

 

SQL> select * from global_name;
 
GLOBAL_NAME
--------------------------------------------------------------------------------
TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM
 
SQL> 

相关文章: