- ORA-00942: la tabla o vista no existe -----
716570Oct 25 2010 — edited Oct 25 2010Hi
I dont know what is the problem in that code. I see the same in other place, its wrong or I have any mistakes
PROCEDURE get_DATABASE_EXPORT IS
h NUMBER; -- handle returned by OPEN
th number; -- handle returned by ADD_TRANSFORM
ddl clob; -- metadata is returned in CLOB
BEGIN
--Open the metadata
h := DBMS_METADATA.OPEN ('DATABASE_EXPORT');
th := DBMS_METADATA.add_transform(h,'DDL');
DBMS_METADATA.set_transform_param (th, 'SQLTERMINATOR', TRUE);
LOOP
ddl := DBMS_METADATA.fetch_clob(h);
EXIT WHEN ddl IS NULL;
DBMS_OUTPUT.PUT_LINE (to_char(DDL));
END LOOP;
DBMS_METADATA.CLOSE(h);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line(TO_CHAR(SQLERRM));
END;