在测试中,发现DatabaseLink不支持merge、lob字段查询(支持lob插入),共享一下。
--1,版本
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Productio
NLSRTL Version 10.2.0.3.0 - Production
--2,merge操作
SQL>
SQL> MERGE INTO login_test@db_link_20_97
2 USING dual
3 ON (user_id = 24268439)
4 WHEN MATCHED THEN
5 UPDATE SET session_id = 'aa', crt_date = SYSDATE
6 WHEN NOT MATCHED THEN
7 INSERT
8 (user_id, session_id, crt_date)
9 VALUES
10 (24268439, 'bb', SYSDATE);
ORA-01008: not all variables bound
ORA-02063: preceding line from DB_LINK_20_97
--3,查询含lob字段的表
SQL>
SQL> select * from transa@db_link_20_97
2 ;
select * from transa@db_link_20_97
ORA-22992: cannot use LOB locators selected from remote tables
--插入
SQL> insert into transa@db_link_20_97
2 select * from transa where rownum<2;
1 row inserted
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18922393/viewspace-697512/ ,如需转载,请注明出处,否则将追究法律责任。