在一个存储过程中通过dblink访问另一个数据库中的表,报04052,但是在相同用户在sqlplus中却可以通过dblink select同一远程数据库中的同一张表
[oracle@db1 ~]$ oerr ora 4052
04052, 00000, "error occurred when looking up remote object %s%s%s%s%s"
// *Cause: An error has occurred when trying to look up a remote object.
// *Action: Fix the error. Make sure the remote database system has run
// KGLR.SQL to create necessary views used for querying/looking up
// objects stored in the database.
[oracle@db1 ~]$
通过创建同义词解决!
create synonym table_name forremote_schema.table_name@dblink
据说:10G这前的一个BUG.