Home » SQL & PL/SQL » SQL & PL/SQL » ORA-02069 (Oracle Database 12c Enterprise Edition Release 12.2.0.1.0)
ORA-02069 [message #679616] |
Tue, 10 March 2020 22:24 |
s4.ora
Messages: 71 Registered: March 2010
|
Member |
|
|
Hi,
I am getting the bellow error while inserting data into a remote database.
Error at Command Line : 23 Column : 11
Error report -
SQL Error: ORA-02069: global_names parameter must be set to TRUE for this operation
02069. 00000 - "global_names parameter must be set to TRUE for this operation"
*Cause: A remote mapping of the statement is required but cannot be achieved
because global_names should be set to TRUE for it to be achieved
*Action: Issue alter session set global_names = true if possible
below is the code that I have used.
insert into OCC_TRAIL_A@dbl.eai
(
ID
,OWNING_OBJECT_ID
,ATTRIBUTE_DEFINITION_ID
,TYPE
,STRING_VALUE
,INTEGER_VALUE
,LONG_VALUE
,FLOAT_VALUE
,DOUBLE_VALUE
,BOOLEAN_VALUE
,TIMESTAMP_VALUE
,TIME_POINT_VALUE
)
select
OCC_TRAIL_A_ID.nextval@dbl.eai as ID
,ot.object_inst_id as OWNING_OBJECT_ID
,d.ATTRIBUTE_ID as ATTRIBUTE_DEFINITION_ID
,d.DATA_TYPE as TYPE
,(case
when d.DATA_TYPE = 'C' then
GET_PICKLIST_DM_ENTRY(cas.ATTR_VALUE, substr(d.QUALIFIED_PICKLIST_ID, instr(d.QUALIFIED_PICKLIST_ID, ':')+1))
when d.DATA_TYPE in ('S', 'U') then
cas.ATTR_VALUE
else NULL
end) as STRING_VALUE
,(case when d.DATA_TYPE = 'I' then cas.ATTR_VALUE else NULL end) as INTEGER_VALUE
,NULL as LONG_VALUE
,(case when d.DATA_TYPE = 'F' then cas.ATTR_VALUE else NULL end) as FLOAT_VALUE
,(case when d.DATA_TYPE = 'D' then cas.ATTR_VALUE else NULL end) as DOUBLE_VALUE
,NULL as BOOLEAN_VALUE
,(case when d.DATA_TYPE = 'T' then cas.ATTR_VALUE else NULL end) as TIMESTAMP_VALUE
,NULL as TIME_POINT_VALUE
from circ_attr_settings@dbl.granite cas, stg_trail_new stn, occ_trail@dbl.eai ot, val_attr_name@dbl.granite van, platform.object_registry@dbl.eai a, dyn_attr_group_obj_types@dbl.eai b, dyn_attr_group@dbl.eai c, dyn_attr_definition@dbl.eai d
where cas.circ_inst_id = stn.ref_id
and stn.name = ot.name
and stn.REVISION_NUMBER = ot.REVISION_NUMBER
and cas.VAL_ATTR_INST_ID = van.VAL_ATTR_INST_ID
and to_english(van.ATTR_NAME) = d.ATTRIBUTE_NAME
and to_english(van.GROUP_NAME) = c.GROUP_NAME
and a.OBJECT_REGISTRY_ID = b.OBJECT_TYPE_ID
and b.GROUP_ID = c.GROUP_ID
and c.GROUP_ID = d.GROUP_ID
and stn.GRANITE_OBJECT_TYPE = 'SEGMENT'
and a.QUALIFIED_OBJECT_ID = 'occ:trail'
and not exists (select 1 from OCC_TRAIL_A@dbl.eai chk_ta where chk_ta.OWNING_OBJECT_ID = ot.object_inst_id and chk_ta.ATTRIBUTE_DEFINITION_ID = d.ATTRIBUTE_ID);
|
|
|
|
Re: ORA-02069 [message #679629 is a reply to message #679617] |
Wed, 11 March 2020 08:34 |
s4.ora
Messages: 71 Registered: March 2010
|
Member |
|
|
Hi,
I need to know , how to resolve this. Changing the DB Link Name is not an option for me.
The below code is working fine.. but why not the one in the OP...
insert into OCC_TRAIL_B@dbl.eai
(
ID
,OWNING_OBJECT_ID
,AFTER
,TARGET_OBJECT_TYPE
,TARGET_OBJECT_ID
,BINDING_NAME
,REV_GROUP_ID
,BINDING_DATA_ID
,BINDING_DATA_TYPE
,TARGET_OBJECT_REV_GROUP_ID
)
select
OCC_TRAIL_B_ID.nextval@dbl.eai as ID
,ot.object_inst_id as OWNING_OBJECT_ID
,NULL as AFTER
,(select OBJECT_REGISTRY_ID from platform.object_registry@dbl.eai where QUALIFIED_OBJECT_ID = 'oci:site') as TARGET_OBJECT_TYPE
,os.site_inst_id as TARGET_OBJECT_ID
,'com.ericsson.granite.oss.core.path.binding.TrailToASideSite' as BINDING_NAME
,ot.REVISION_GROUP_ID as REV_GROUP_ID
,NULL as BINDING_DATA_ID
,NULL as BINDING_DATA_TYPE
,NULL as TARGET_OBJECT_REV_GROUP_ID
from occ_trail@dbl.eai ot, STG_TRAIL_NEW stn, oci_site@dbl.eai os
where ot.name = stn.name
and ot.REVISION_NUMBER = stn.REVISION_NUMBER
and stn.A_SIDE_SITE = os.name;
|
|
|
Goto Forum:
Current Time: Thu Dec 26 12:27:34 CST 2024
|