【发布时间】:2019-11-25 23:17:46
【问题描述】:
我在 Oracle 中有 3 个模式。第三个架构中有一个物化视图,我需要从第一个架构刷新。
以下是需求的详细说明:
uv1(第一个模式)--> db 链接到nwdb2(第二个模式)--> nwdb3(第三个模式)--> emp_de_mv(MV)
我需要从uv1 刷新emp_de_mv。
我已经在 uv1 的 MV 上执行了 SELECTstatement,如下所示,它正在成功运行:
SELECT * FROM nwdb3.emp_de_mv@nwdb2;
我尝试按照here的建议从uv1刷新MV。
EXEC DBMS_MVIEW.refresh('nwdb3.emp_de_mv@nwdb2', 'C');
但它给了我以下错误:
Error starting at line : 25 in command -
EXEC DBMS_MVIEW.refresh('nwdb3.emp_de_mv@nwdb2', 'C')
Error report -
ORA-20000: ORA-00979: illegal reference to remote database
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2809
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3025
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2994
ORA-06512: at line 1
20000. 00000 - "%s"
*Cause: The stored procedure 'raise_application_error'
was called which causes this error to be generated.
*Action: Correct the problem as described in the error message or contact
the application administrator or DBA for more information.
谁能帮我解决上述要求?
请注意,出于安全原因,我将无法在uv1 中创建新的数据库链接。
【问题讨论】:
-
@APC 感谢您的回复。有效。我的问题解决了。但是我仍然很想知道如何在没有 DB 链接的情况下直接从
nwdb2访问nwdb3以及为什么我不能从uv1直接访问nwdb2而没有 DB 链接?
标签: oracle distributed-computing materialized-views