Home » RDBMS Server » Networking and Gateways » DBLink problem with insert as select
DBLink problem with insert as select [message #67448] Thu, 29 July 2004 06:22 Go to next message
MagicBuzz
Messages: 7
Registered: July 2004
Junior Member
Hello,

I use a dblink between a database hosted by Oracle 8.1.x and another hosted by Oracle 8.0.x

Here are my tries :
insert into pro@ecomtest.world (codsoc, CODPRO) values (0, '123');
=> It works

select pro.CODPRO, pro.FAMPRO, pro.SFAPRO, pro.SSFPRO, pro.QOTITE, pro.CODUNI, replace(pro.MOTCLE, '''', ''''''), pro.TYPPRO, pro.CODTAR, pro.TYPTAR, pro.CODTVA, pro.QTEMIN, pro.CODTAX, pro.CODTAX2, pro.POIDS, pro.HAUTE, pro.LARGE, pro.LONGUE, pro.VOLUME, replace(pro.REFPRO, '''', ''''''), pro.POIDSNET, pro.CODBLOCAGE, pro.CODPAY, pro.codzn13, ' ', ' ', pro.codsoc, convert_codzn12(pro.codzn12)
from
pro
where pro.codsoc = 0
and pro.codblocage in ('11','11B', 'INV', '15')
and
not (pro.fampro = '5BSERV' and pro.sfapro = 'CHARGE') and upper(substr(pro.codpro, 3, 1)) <> 'X'
=> It works

insert into pro@ecomtest.world --(CODPRO, FAMPRO, SFAPRO, SSFPRO, QOTITE, CODUNI, motcle, TYPPRO, CODTAR, TYPTAR, CODTVA, QTEMIN, CODTAX, CODTAX2, POIDS, HAUTE, LARGE, LONGUE, VOLUME, refpro, POIDSNET, CODBLOCAGE, CODPAY, bt, famweb, sfaweb, codsoc) --, webdis)
--values
(
select
pro.CODPRO, pro.FAMPRO, pro.SFAPRO, pro.SSFPRO, pro.QOTITE, pro.CODUNI, replace(pro.MOTCLE, '''', ''''''), pro.TYPPRO, pro.CODTAR, pro.TYPTAR, pro.CODTVA, pro.QTEMIN, pro.CODTAX, pro.CODTAX2, pro.POIDS, pro.HAUTE, pro.LARGE, pro.LONGUE, pro.VOLUME, replace(pro.REFPRO, '''', ''''''), pro.POIDSNET, pro.CODBLOCAGE, pro.CODPAY, pro.codzn13, ' ', ' ', pro.codsoc, convert_codzn12(pro.codzn12)
from
pro
where pro.codsoc = 0
and pro.codblocage in ('11','11B', 'INV', '15')
and
not (pro.fampro = '5BSERV' and pro.sfapro = 'CHARGE') and upper(substr(pro.codpro, 3, 1)) <> 'X'
)
=> I get this error message :
The following error has occurred:

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

Do you know why ? How could I fix it ?
Re: DBLink problem with insert as select [message #67458 is a reply to message #67448] Fri, 06 August 2004 06:07 Go to previous message
Vincenzo
Messages: 6
Registered: July 2004
Junior Member
Set GLOBAL_NAMES=TRUE in the init<SID>.ora if possible.

I report a similar problem from metalink that can help you:

INSERT INTO RUCS@SOA.WORLD( RUC_RUC, RUC_DSM, RUC_DENOMINACION, RUC_DSC )
SELECT B.RUC_RUC, B.RUC_DSM, B.RUC_DENOMINACION, B.RUC_DSC
FROM RUCS B WHERE NOT EXISTS( SELECT RUC_RUC FROM RUCS@SOA.WORLD WHERE RUC_RUC = B.RUC_RUC );
ORA-02069: global_names parameter must be set to TRUE for this operation

resolve with:

FOR R IN ( SELECT B.RUC_RUC, B.RUC_DSM, B.RUC_DENOMINACION, B.RUC_DSC
FROM ADM.RUCS_ME B
WHERE NOT EXISTS( SELECT RUC_RUC FROM ADM.RUCS_ME@SOA.WORLD WHERE RUC_RUC = B.RUC_RUC )
) LOOP
BEGIN
INSERT INTO RUCS_ME@SOA.WORLD(RUC_RUC , RUC_DSM , RUC_DENOMINACION , RUC_DSC , RUC_EMPRESAGESTION )
VALUES(R.RUC_RUC , R.RUC_DSM , R.RUC_DENOMINACION , R.RUC_DSC , 'DEF' );
END;
Previous Topic: delete listener.log
Next Topic: I´m feeling stupid but...
Goto Forum:
  


Current Time: Sun Nov 24 22:42:48 CST 2024