My Oracle Support Banner

Text Query via DB-Link Results in ORA-949 (Doc ID 261741.1)

Last updated on FEBRUARY 26, 2019

Applies to:

Oracle Text - Version 11.2.0.4 to 12.2.0.1 [Release 11.2 to 12.2]
Information in this document applies to any platform.

Symptoms

Using Oracle Text query operator 'CONTAINS' on remote database via database link joining with local table raises ORA-949.

The following example demonstrates this:

Connect as any user <USER> and create the following

Remote:

CREATE TABLE quick (text VARCHAR2(80));
INSERT INTO quick ( text ) VALUES ('The cat sat on the mat' );
COMMIT;
CREATE INDEX quick_text ON quick ( text ) INDEXTYPE IS CTXSYS.CONTEXT;



Local:

CREATE DATABASE LINK remote CONNECT TO <USER>  IDENTIFIED BY <PASSWORD> USING '...<connect_string>';

<connect_string>

If database parameter global_names = true, database link needs to match global database name .

This query fails:


SQL> SELECT * FROM quick@remote, dual where contains@remote(text,'cat')>0;
SELECT * FROM quick@remote, dual where contains@remote(text,'cat')>0
*
ERROR at line 1:
ORA-949: illegal reference to remote database

Cause

To view full details, 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 a vibrant support community of peers and Oracle experts.