Which two reports can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL package?

Which two reports can be retrieved by using the various procedures in the DBMS_METADATA
PL/SQL package? (Choose two.)

Which two reports can be retrieved by using the various procedures in the DBMS_METADATA
PL/SQL package? (Choose two.)

A.
DDL report for all objects dependent on a table

B.
DDL report for all the objects stored in a tablespace

C.
DDL report for all the invalidated objects in a schema

D.
data definition language (DDL) report for all the tables in a schema



Leave a Reply 6

Your email address will not be published. Required fields are marked *


PIERO

PIERO

HAY GUYS, NOT ONLY OBJECTS TABLE AND DEPENDENT BY TABLE…….

select dbms_metadata.get_ddl(‘USER’,’SCOTT’)
2 from dual;
CREATE USER “SCOTT”
IDENTIFIED BY VALUES ‘F894844C34402B67’
DEFAULT TABLESPACE “USERS”
TEMPORARY TABLESPACE “TEMP”

Leo Yu

Leo Yu

you are right, user can be created as well. But the question is just “can”

Thomas Kyte

Thomas Kyte

A,B,D are correct.
But we must choose only two, so I would choose A,D

== A ==
GET_DEPENDENT_DDL()

== B ==
DECLARE
h NUMBER; — handle
th NUMBER; — handle for the transform
doc CLOB; — clob to hold the extracted ddl
BEGIN
h := DBMS_METADATA.OPEN(‘DATABASE_EXPORT’);
th := DBMS_METADATA.GET_TRANSFORM_PARAM(h, ‘DDL’);
LOOP
doc := DBMS_METADATA.FETCH_CLOB(h);
EXIT WHEN doc IS NULL;
INSERT INTO my_ddl VALUES doc:
END LOOP;
DBMS_METADATA.CLOSE(h);
END;

== C ==
No, DBMS_METADATA won’t help you.
select * from all_objects where status = ‘INVALID’ and owner = ‘YOUR_SCHEMA_NAME’

== D ==
The same way as in question #1.
Just use SCHEMA_EXPORT instead of DATABASE_EXPORT.