Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

- ORA-00942: la tabla o vista no existe -----

716570Oct 25 2010 — edited Oct 25 2010
Hi
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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2010
Added on Oct 25 2010
7 comments
1,463 views