Eu estou fazendo uma carga de campos BLOB's, onde a origem é acessada via DB_LINK:
/* Use of a PL-SQL bloc to perform the Insert (management of LONGS and LOBS etc.) */
declare cursor myCursor is
select
C1_IMG_ID IMG_ID,
(select C2_ICON from dual) ICON,
'I' IND_UPDATE
from DESTINO.C$_0IMAGES
where (1=1)
;
begin
/* Loop over the Cursor and execute the insert statement */
for aRecord in myCursor loop
insert into DESTINO.I$_IMAGES
(
IMG_ID,
ICON,
IND_UPDATE
)
values (
aRecord.IMG_ID,
aRecord.ICON,
aRecord.IND_UPDATE
)
;
end loop;
end;
Oracle Error: ORA-22275
Error Description:
Invalid LOB locator specified
Error Cause:
There are several causes: (1) the LOB locator was never initialized; (2) the locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator; (3) the locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator; (4) trying to update the LOB in a trigger body -- LOBs in trigger bodies are read only; (5) the locator is for a BFILE/BLOB and the routine expects a CLOB/NCLOB locator; (6) the locator is for a CLOB/NCLOB and the routine expects a BFILE/BLOB locator;.
Action:
For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2),(3), (5) and (6)pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value.
Porém , quando faço isso em produção é que ocorre o erro.
Será que isso é um BUG do Banco.
Versão da origem em produção:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Versão do destino em produção:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
Versão do banco de teste:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production