terça-feira, 11 de outubro de 2011

dbms_metadada

Extraindo objetos do banco usando dmbs_metadata


 

 

select  dbms_metadata.GET_DDL('PROCEDURE',u.object_name)
  from  user_objects u
 where  object_type = 'PROCEDURE';
--
select  dbms_metadata.GET_DDL('FUNCTION',u.object_name)
  from  user_objects u
 where  object_type = 'FUNCTION';
--
select  dbms_metadata.GET_DDL('INDEX',u.object_name)
  from  user_objects u
 where  object_type = 'INDEX';
--
select  dbms_metadata.GET_DDL('TABLE',u.object_name)
  from  user_objects u
 where  object_type = 'TABLE';
--
select  dbms_metadata.GET_DDL('TRIGGER',u.object_name)
  from  user_objects u
 where  object_type = 'TRIGGER';

Nenhum comentário :

Postar um comentário

Related Posts Plugin for WordPress, Blogger...