Search This Blog

Thursday, March 29, 2012

Extract a schema

set pages 500
set lines 200
set long 100000
select dbms_metadata.get_ddl( 'USER', 'AIRTEL' ) from dual
UNION ALL
select dbms_metadata.get_granted_ddl( 'SYSTEM_GRANT', 'AIRTEL' ) from dual
UNION ALL
select dbms_metadata.get_granted_ddl( 'OBJECT_GRANT', 'AIRTEL' ) from dual
UNION ALL
select dbms_metadata.get_granted_ddl( 'ROLE_GRANT', 'AIRTEL' ) from dual;

No comments:

Post a Comment