The GLOBAL_NAMES parameter research recently found that the GLOBAL_NAMES parameter must be set to TRUE When configuring Stream. The specific reason is unknown. However, it is found that after this parameter is set, there is a problem in refreshing the materialized views of the database every day. Then find out the cause, that is, DBLINK has a problem. After studying the GLOBAL_NAMES parameter, we found that the GLOBAL_NAMES parameter is not used to control GLOBAL_NAME, but to restrict the use of DBLINK. The following describes the role of this parameter: GLOBAL_NAMES. To put it simply, when the GLOBAL_NAMES parameter is set to TRUE, the name of DBLINK must be consistent with the GLOBAL_NAME of the connected database. I originally wanted to perform a few simple tests, but I found that someone has already written the test on the Internet. I think it would be a little complicated to configure the database. I copied it directly: when the GLOBAL_NAMES parameter is set to TRUE, the database link name must be consistent with the GLOBAL_NAME of the connected DATABASE. In the test, the database link created is XJ (WINDOWS 2003 ORACLE 10g 10.2.0.1), and the connected database is DMDB (LINUX AS5 ORACLE 10g 10.2.0.1 RAC) first, check the related configuration of DMDB: SQL> show parameter global_names name type value ------------------------------------ ----------- global_names boolean false SQL> select * from global_name ;; the GLOBAL_NAME----------------------------------------------------------DMDB can see that the global_names parameter of the Linked Library is FALSE. The configuration of the database to create the database link: SQL> show parameter global_names NAME TYPE VALUE ------------------------------------------- global_names boolean FALSESQL> select * from global_name; The GLOBAL_NAME--------------------------------------------------------XJ then performs the following operations: SQL> create database link test_link connect to test identified by test using 'dmdb'; the database link has been created. SQL> select * from dual @ test_link; The D-X can see that the database link works properly. Set global_names to TRUE in the DMDB Database: SQL> alter system set global_names = true; the system has changed. Query again on the xj database and create a new database link for query: SQL> select * from dual @ test_link; d-X SQL> create database link test_link2 connect to test identified by test using 'dmdb'; database link created. SQL> select * from dual @ test_link2; D-X at this time you can see that the database link works normally. Set the global_names parameter of XJ database to TRUE: SQL> alter system set global_names = true; the system has changed. SQL> select * from dual @ test_link2; select * from dual @ test_link2 * row 1st error: ORA-02085: database link TEST_LINK2 connect to dmdb SQL> select * from dual @ test_link * 1st Line Error: ORA-02085: the database link TEST_LINK is connected to the DMDB, And the global_names of XJ database is set to FALSE again, the database link is available again. SQL> alter system set global_names = false; the system has changed. SQL> select * from dual @ test_link; D-X SQL> select * from dual @ test_link2; The D-X then sets the global_names OF THE DMDB database to FALSE, the database link is still available: On the DMDB database: SQL> alter system set global_names = false; the system has changed. On the XJ Database: SQL> select * from dual @ test_link; The D-X can see that the link is still available. If you create a link to the XJ database in the DMDB database, you can observe the same results. We can draw a conclusion: the global_names parameter is set to FALSE, which affects the use of the database link that creates the database link. That is to say, if the global_names parameter of a database (Instance) is set to TRUE, the database connected to other databases must have the same name as global_name of the connected database: on the XJ Database: SQL> alter system set global_names = true; the system has changed. SQL> create database link dmdb connect to test identified by test using 'dmdb'; the database link has been created. SQL> select * from dual @ dmdb; D-XSQL> select * from dual @ test_link; select * from dual @ test_link * 1st Line Error: ORA-02085: database link TEST_LINK connect to dmdb SQL> select * from dual @ test_link2; select * from dual @ test_link2 * 1st Line Error: ORA-02085: database Connection TEST_LINK2 connects to DMDB. If GLOBAL_NAMES is set to TRUE, what should I do if I want to create multiple databases to link to the same database? Because the Database Link name must be the same as GLOBAL_NAME of the target database. You can use the following method: SQL> create database linkdmdb @ link1connect to test identified by test using 'dmdb'; the database link has been created. SQL> create database linkdmdb @ link2connect to test identified by test using 'dmdb'; the database link has been created. SQL> select * fromdual @ dmdb; D-X SQL> select * fromdual @ dmdb @ link1; D-X SQL> select * fromdual @ dmdb @ link2; the D-X, that is, add @ to the end of GLOBAL_NAME with an identifier. In this way, multiple databases can be created and linked to the same target database. In addition, you cannot create a link to another SCHEMA when creating a database link. This is because the database link name can contain '.', that is, the node number. For example, user A wants to create a dblink named LINKB and create database link B for user B. LINKB ......, this statement will actually create A user named B. LINKB database link.