分类: Oracle
2013-01-04 16:11:27
Inserting Data To View Mapped Via Dblink To Remote Table Returns Ora-02069 [ID 467787.1] | 转到底部 |
修改时间:2012-11-10类型:PROBLEM状态:MODERATED优先级:3 |
|
In this Document
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
-- Problem Statement:
Inserting data to view mapped via database
link to remote table fails with ORA-02069, And if we set the
global_names to true, then will face ORA-04054.
See the next test case for more information :
Note: The error ORA-02069 message shows part of the solution, "global_names parameter must be set to TRUE" But Its not enough, the next parts will help to understand the root cause, and the complete solution.
Global_names is not set to true. And no Database link to the local database is existing on the remote database.
In this scenario, you need the following to have the insert statement working :
1. Global_names set to true.
2. Database link to the local database has to be exist on the remote database.
When call the PLSQL function inline with the insert statement. Its needs to execute and return the
output to the remote session via the database link (the local one) . After the insert the remote
session will need to send acknowledge to the local database , and therfore will need another
database link on the remote site connecting to the local database.
For this reason, its mandatory to have the global_names set to true, this enables oracle to
automatically detect the remote database link name, which will be the same like the local database
name (this is the case only if the global_names was set to true).
-- To implement the solution, please execute the following steps::
1. Set the global_names to true (you may do it on the session level if not possible on the system level).
2. Create database link on the remote site connecting to the local one with the same name like the local global_name .
For example on the above test case :
You will need to create database link on ORC2 using the next syntax :
-- Then On the local database ORC1 :
-- Now we can test the insert statement :