|
|
Re: Re: Re: 谁请帮忙测试!用DBMS_METADATA这个包 来取出远程服务器(通过DATABASE L
最初由 Yong Huang 发布
[B]
Thanks for the solution. I was messing with dbms_lob.substr last night but forgot the @dblink for it. So all three @dblink parts are needed.
If someone really really wants to avoid using dbms_lob, there *is* a way, although it's not practical. First you have to have a table in the remote DB that has a clob column (if none, create one). Second you have to have such a table locally (not necessarily the same name). Then
insert into lobtabremote@remote select dbms_metadata.get_ddl@remote('TABLE','TEST') from dual; --dual@remote works too but unnecessary
insert into lobtablocal select lobcol from lobtabremote@remote; -- add where clause if needed
select lobcol from lobcol; -- add where clause if needed
Not sure if there's a way to "virtualize" the lob tables so they don't have to physically exist. But all these are just brain exercises. The simple and practical way is use dbms_lob.substr@remote as you showed.
Yong Huang [/B]
不用客气,我也不过是运气比较好,碰巧成功了。
 |
|