溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle ORA-22992問題

發布時間:2020-08-06 21:26:05 來源:ITPUB博客 閱讀:242 作者:水逸冰 欄目:關系型數據庫

create /*source only*/ table mingshuo.tmp_ms_19031403 as select * from  backupwt.tmp_ms_19031403@dblk_e1
在利用上面的通過dblink搬遷數據的時候,發生報錯
ORA-22992: cannot use LOB locators selected from remote tables
SQL> !oerr ora 22992
22992, 00000, "cannot use LOB locators selected from remote tables"
// *Cause:  A remote LOB column cannot be referenced.
// *Action:  Remove references to LOBs in remote tables.
可以看到是因為源表中有lob字段導致的。
關于這個報錯有兩個簡單的解決辦法
1.全局臨時表
2.物化視圖

先來看第一個全局臨時表的方法:
現在目標端建立目標表結構:
create /*source only*/ table mingshuo.tmp_ms_19031403 as select * from  backupwt.tmp_ms_19031403@dblk_e1 where 1=0;

目標端建立全局臨時表:
-- Create table
create /*source only*/ global temporary table mingshuo.gb_temp_tab
(
  id             NUMBER(20) not null,
 。。。
) on commit delete rows;

insert into mingshuo.gb_temp_tab select * from backupwt.tmp_ms_19031403@dblk_e1;
注意將數據插入到臨時表中后不要提交,否則數據沒有了
將臨時表中的數據插入到目標表中:
insert into mingshuo.tmp_ms_19031403 select * from mingshuo.gb_temp_tab;
commit;

第二種通過物化視圖的方法
通過物化視圖將數據傳遞到本地來。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女