ORA-22992:无法使用从远处表选择LOB定位器(转载)

                       

本文转载自:https://blog.csdn.net/yangwenxue_admin/article/details/51464472

                          ORA-22992:无法使用从远处表选择LOB定位器

   错误异常:[Error] Execution (1: 1): ORA-22992: 无法使用从远程表选择的 LOB 定位器

   原因:使用dblink从远程数据库向本地数据库 INSERT数据时,因远程表中含有BLOB字段,在SELECT 和 INSERT INTO操作时,报"ORA-22992: 无法使用从远程表选择的 LOB 定位器"错误,通过创建临时表并从临时成功把数据插入到目的表中。

   解决办法:

   1、创建一张临时表。

    

create global temporary table table_temp as select * from tj_json_info where 1=2

                                                           

   2、然后利用database link把远程数据先insert到临时表中,insert后先不要commit,否则commit后临时表中数据就会丢失。

insert into table_temp select * from tj_json_info@db1

           
 

   3、将临时表中的数据insert到目标库表。

insert into tj_json_info select * from table_temp


 

   

完毕,将临时表drop掉

drop table table_temp

猜你喜欢

转载自blog.csdn.net/luolincsdn/article/details/81101515
今日推荐