Wednesday 13 March 2013

DATABASE OBJECTS BACKUP



View backup
==========
Select dbms_metadata.get_ddl(‘’,’’,’OWNER’) from dual;

set long 100000
spool MTL_SYS_ITEMS_VL.lst
select text from dba_views where VIEW_NAME='MTL_SYS_ITEMS_VL';
spool off

Package Body Backup
===================
set pagesize 0
set linesize 800
set trimspool on
set heading off
set feedback off
spool GEPS_ARCH_PKG.bkp  
select text from dba_source where name='GEPS_ARCH_PKG'; and type='PACKAGE';
spool off
exit

Spool in excel format
==========================

SET LINESIZE 4000
SET VERIFY OFF
SET FEEDBACK OFF
SET PAGESIZE 999
SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF
SPOOL general.xls
select NAME,VALUE from $parameter;
spool off
exit

Package backup
==============
set pages 0
set linesize 200
set head off.lst
spool GEPS_SO_PRICE_PKG
select text from dba_source where name='GEPS_SO_PRICE_PKG' and type like '%PACKAGE%';
spool off


Backup of a procdure
======================
set heading off
set feedback off
set pages 0
set long 1000000
set linesize 400
select text from dba_source where name='SBR_PREP_AP_INV' and OWNER='APPS' and type='PROCEDURE';



No comments:

Post a Comment