Solution to ORA-22992 reported by oracle LOB field for accessing remote database via DBLink

Source: Internet
Author: User


Oracle through DBLink access to the remote database LOB field reporting ORA-22992 solution recently in a photo collection function, photo collection is outside the network library, while the Internet after the photo collection, the Intranet will read the photos in the Internet library (the photo field is BLOB type), if the Intranet directly through the select statement to query the Internet library photos, it will report ORA-22992: cannot use LOB locators selected from remote tables error. I checked the solution online and recorded it for later viewing. Method 1: Create a table containing large fields (BLOB) on www.2cto.com, and then use inser... Select... From... @ Dblink: insert data to the Intranet database table and directly operate the intranet database table. For example, create a table: [SQL] SQL> create table inner_table select * from outer_table @ dblink: [SQL] SQL> insert into inner_table select * from outer_table @ dblink writes data in the outer table outer_table TO THE inner_table on the Intranet. Www.2cto.com Method 2: create a global temporary table that is the same as the remote database of dblink locally, and then query the temporary table: -- create a temporary table: [SQL] SQL> create global temporary table tem_table (... ) On commit delete rows; insert data: [SQL] SQL> insert into tem_table select * fromouter_table @ dblink; xxx rows created. in this way, the data is written to the temporary table, but the data is deleted after submission (the feature of the temporary table ). In fact, both methods are similar, except that a temporary table is used and a permanent table is used. Author mhmyqn

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.