Ora-22992 workaround (Doc ID 436707.1)

Last updated on MAY 10, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Symptoms

When trying to select from a remote table, getting  'ORA-22992: cannot use LOB locators selected from remote tables.' as following:

1. From the remote database:
create user cris identified by cris;
grant connect, resource to cris;
conn cris/cris
create table test(id number, obj clob);
insert into test values(1,'sdfsdfsfd');
insert into test values(2, 'sdfsdfsfdvfgdfvgdfvdf');
commit;

2 From the local database:


create user cris identified by cris;
grant connect, resource, create database link to cris;
conn cris/cris
create database link torem using 'identification of the remote database in the tnsnames.ora';

set serveroutput on

declare
my_ad clob;
BEGIN
SELECT obj INTO my_ad FROM test@torem where id=1;
dbms_output.put_line(my_ad);
END;
/

*
ERROR at line 1:
ORA-22992: cannot use LOB locators selected from remote tables
ORA-06512: at line 4

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms