dbms_mview.explain_rewrite gives ORA-01704 and ORA-06512 errors (Doc ID 336470.1)

Last updated on MAY 12, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 9.2.0.1 [Release 9.2]
Information in this document applies to any platform.
***Checked for relevance on 22-Apr-2013***


Symptoms

In 9.2 the following process can give errors.

declare
query varchar2(32000) :=
'select ..............'

begin
dbms_mview.explain_rewrite(query);
end;
/
select message from rewrite_table order by sequence;

ERROR at line 1:
ORA-01704: string literal too long
ORA-06512: at "SYS.DBMS_XRWMV", line 0
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 1525
ORA-06512: at line 105
no rows selected

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