2017-07-27 10 views
0

db1には2つのdb、test_tableがあり、フィールド索引付きのコンテキスト索引付きです。クエリ:Oracleコンテキスト・インデックス:dblinkで動作しません

select * 
    from test_table t 
where contains(t.a, 'str') > 0 

db1で正常に動作します。私は、他のデータベースからデータベース・リンク上で同じクエリを実行しようとすると、しかし:

ORA-20000:Oracle Textのエラー: DRG-10599:列が索引付けされていない

+0

あなたは、DB2でのデータベース・リンクを使用してビューをDB1に(述語で)クエリのビューを作成し、クエリと考えていますか? –

答えて

0

select * 
    from [email protected] t 
where contains(t.a, 'str') > 0 

私はこのエラーを取得します機能するにはdblinkを追加する必要があります。 https://docs.oracle.com/cd/E11882_01/text.112/e24436/csql.htm#CCREF0104

The CONTAINS operator also supports database links. You can identify a remote table or materialized view by appending @dblink to the end of its name. The dblink must be a complete or partial name for a database link to the database containing the remote table or materialized view. (Querying of remote views is not supported.)

select * 
    from [email protected] t 
where contains(t.a, 'str')@db1 > 0. 
+0

ありがとうございます、唯一の解説です - 正しいバージョンは次のようになります: select * from test_table @ db1 t ここで@ db1(t.a、 'str')> 0が含まれています。 –

関連する問題