Wednesday, May 9, 2012

Object Backups

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

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

Package Body Backup
===================
set pagesize 0
set linesize 800
set trimspool on
set heading off
set feedback off
spool Mwac_Warranty_sn_Pk.bkp   
select text from dba_source where name='MWAC_WARRANTY_SN_PK'; and type='';
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 XazyerS.xls
select NAME,VALUE from gv$parameter;

spool off
exit

No comments:

Post a Comment