Pular para o conteúdo principal

Postagens

Mostrando postagens de abril, 2010

wrap objects

Sample code to wrap any objects from schema. declare vFonte varchar2(32767); vCursor number; vError number; begin vCursor := dbms_sql.open_cursor; for rObjetos in (select owner, name, type from dba_source where type in ('PACKAGE BODY', 'PROCEDURE', 'FUNCTION') and line = 1 and instr(text, 'wrapped') " and owner = 'DENILSON' order by owner, name, type) loop SELECT DBMS_METADATA.GET_DDL(rObjetos.type, rObjetos.name, rObjetos.owner) into vFonte FROM dual; dbms_sql.parse(vCursor, vFonte, dbms_sql.native); vError := dbms_sql.execute(vCursor); dbms_ddl.create_wrapped(ddl => vFonte); end loop; dbms_sql.close_cursor(vCursor); end; /