GET_DDL Returning Error ORA-31603 (Object Not Found)
lawarnerJul 26 2005 — edited Jun 22 2011Executing the following statement:
SELECT dbms_lob.substr(
DBMS_METADATA.GET_DDL('TYPE', 'VEST_INCR_HIST_T', 'LW_SM' ),32000,1)
INTO :P1_CLOB FROM DUAL;
from htmldb returns the following error.
ORA-31603: object "SM_RETENTION_LOG" of type TABLE not found in schema "LW_SM"
Executing the equivalent statement from SQLQ*Plus works fine.
DECLARE
v_str VARCHAR2(4000);
BEGIN
SELECT dbms_lob.substr(
DBMS_METADATA.GET_DDL('TYPE', 'VEST_INCR_HIST_T', 'LW_SM' ),32000,1)
INTO v_str FROM DUAL;
DBMS_OUTPUT.PUT_LINE ( SUBSTR(v_Str,1,255) );
END;
We have seen the same error with permission problems, but the HTMLDB_PUBLIC_USER has the correct access to execute the statement as seen in SQL*PLUS. The only difference is that from the HTMLDB application I must log in as the user. Within SQL*PLUS the password is the administrator's password.
Can anyone help? This is keeping us from going live with the application.