Table Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘TABLE’,’&TABLE_NAME’,’&OWNER’) FROM DUAL;
Procedure Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘PROCEDURE’,’&PROCEDURE_NAME’,’&OWNER’) FROM DUAL;
Tablespace Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘TABLESPACE’,’&TABLESPACE_NAME’) FROM DUAL;
Index Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘INDEX’,’&INDEX_NAME’,’&OWNER’) FROM DUAL;
User Metadata Definition :
set pagesize 0
set long 90000
SELECT DBMS_METADATA.GET_DDL(‘USER’,’&OWNER’) FROM dual;
OBJECT_GRANT Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_granted_ddl(‘OBJECT_GRANT’,’&USERNAME’) from dual;
ROLE_GRANT Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_granted_ddl(‘ROLE_GRANT’,’&USERNAME’) from dual;
SYSTEM_GRANT Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_granted_ddl(‘SYSTEM_GRANT’,’&USERNAME’) from dual;
USER Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘USER’,username) AS ddl from dba_users;
FUNCTION Metadata Definition :
set pagesize 0
set long 90000
select dbms_metadata.get_ddl(‘FUNCTION’,’&FUNCTION_NAME’,’&OWNER’) FROM DUAL;
Nihitha
Quality Data
sai
Useful Information…