利用透明網關,oracle與SQLServer數據傳輸

先建好透明網關!!

1、在PLSQL/oracle中查詢SQLServer的數據:

字段要加雙引號"",例如:"ID"

2、從oracle中插入數據到SQLServer中時,不能直接insert intoTable(A,B)@sqlserver select A,B from oracle,這樣會報錯

ERROR at line 1:
ORA-02025: all tables in the SQL statement must be at the remote database

要使用遊標或者For循環

SQL> begin
    for x in(select userid,lgnname,username from  userdoc) loop
    insert into userdoc_tmp@test values(x.userid,x.lgnname,x.username);
    end loop;
   commit;
  end;
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章