【原創】ORA-02085問題的解決

木頭一個發表於2008-05-12

建立database link

sys@ORCL>create database link fgos connect to fgos identified by fgos using 'FGOS';

Database link created.

通過database link查詢遠端資料庫,報ORA-02085錯誤

sys@ORCL>select * from dual@fgos;
select * from dual@fgos
                   *
ERROR at line 1:
ORA-02085: database link FGOS.REGRESS.RDBMS.DEV.US.ORACLE.COM connects to FGOSDB

發現global_names是true(在訪問遠端資料庫時會自動新增.REGRESS.RDBMS.DEV.US.ORACLE.COM )

sys@ORCL>show parameter glglobal_names

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- -------
global_names                         boolean                          TRUE

將global_names改為false後問題解決

sys@ORCL>alter system set global_names=false;

System altered.

sys@ORCL>select * from dual@fgos;

D
-
X

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/498744/viewspace-265191/,如需轉載,請註明出處,否則將追究法律責任。

相關文章