title: In Oracle, how to select LOBs from remote database without copying to local tables?
body: <p>I am writing some scripts for data migration and the insert part (insert into ... select from) works great so far. However the verification statements gives the following error:</p>
  
  <pre><code>22992. 00000 -  "cannot use LOB locators selected from remote tables"
  </code></pre>
  
  <p>Which is caused by selecting a CLOB column from a remote DB:</p>
  
  <pre><code> select sum(owa_opt_lock.checksum(clobCol)) into x_var from TableA@OLD_DB;   
   select sum(owa_opt_lock.checksum(clobCol)) into y_var from TableA;
   --Compare the check sums to verify if migration succeed
  </code></pre>
  
  <p>After researching it seems like the standard solution to this error is to copy the data to a local table beforehand. But this is defeating the purpose of verification since corruption may occur while copying to local table!</p>
  
  <p>Another solution from the web I found is to do the following:</p>
  
  <pre><code>SELECT (select column_b from sample_table@TEST_LINK) AS column_b FROM DUAL
  </code></pre>
  
  <p>which is said to be work on earlier versions of Oracle but doesn't work in 12C.</p>
  
  <p>What should I do?</p>