miercuri, 13 noiembrie 2013

ORA-02069: global_names parameter must be set to TRUE for this operation

Sometime, this error message occurs somehow without any reasonable meaning.

Example:

Insert into table@dblink select * from view;

ORA-02069: global_names parameter must be set to TRUE for this operation

Apparently, there is no reason to panic, you have to set that parameter appropriately and everything is working again. I don't care why, but when i did that:

alter session set global_names=true
Insert into table@dblink select * from view;

[Error] Execution (9: 28): ORA-02085: database link dblink.domain connects to XE

What can i do? The sid is correct, the global name of the database is:

select * from global_name;

GLOBAL_NAME
-----------
XE

Well, the answer is inside of that view. Some objects suitable to be called by views cannot be "smuggled" through the dblink and executed among of a normal insert in the target database.
My workaround was:

create table_temp as select * from view;
insert into table@dblink select * from table_temp;

Now, the records are static, no computing is necesary, and the insert command will behave normally.

Niciun comentariu:

Trimiteți un comentariu