設置數據庫參數global_names=false,不要求建立的數據庫鏈接和目的數據庫的全局名稱一致。global_names=true則要求, 多少有些不方便。 oracle9i和oracle8i都可以在DBA用戶下用SQL命令改變global_names參數alter system set global_names=false,建立公有的數據庫鏈接:
create public database link pubs connect to testuser identified by testuser_pwd using 'pubs'; create public database link northwind connect to testuser identified by testuser_pwd using 'northwind';
create table stores as select * from stores@pubs; select zip from stores; ERROR 位于第 1 行: ORA-00904: 無效列名 select "zip" from stores; zip ----- 98056 92789 96745 98014 90019 89076