【发布时间】:2016-11-26 09:15:13
【问题描述】:
我有一个远程表,其中包含通过数据库链接访问的 blob 列。我想将本地表中的 blob 插入到远程表 blob 列中。我正在执行动态sql,如下所示
declare
theblob blob;
theclob clob;
thenumber number;
begin
select base64encode2(image) into theclob from per_images where image_id = 113077;
execute immediate 'insert into image@APPSERP2ERPAPPS(column1,column2,column3) values((select null from dual),(select base64encode2(image) from per_images where image_id = 113077),(select ceil(5.4) from dual))';
commit;
end;
当我运行 sql 时,我得到 ORA-02069: global_names parameter must be set to TRUE for this operation。
如果我执行ALTER SESSION SET GLOBAL_NAMES = true,那么我在插入 blob 时收到 数据库链接 APPSERP2ERPAPPS.CSN.EDU.PK 连接到 TEST.CSN.EDU.PK 错误。
请告诉我如何将 blob 插入远程表 blob 列。
谢谢
【问题讨论】:
-
嗨,您是否寻找过连接问题或相关问题,您是否尝试过没有像这里 asktom.oracle.com/pls/apex/… 那样的“值”
-
当我插入 null 它没有给出错误。 INSERT INTO image@APPSERP2ERPAPPS SELECT * FROM mview 但同样的错误
-
@karelss 谢谢。您提供的链接有效。
-
你很高兴我会把这个作为答案,你能在这里发布最终解决方案
-
是的,请确定...
标签: plsql dynamic-sql