HomeArticlesSlideshowsAsk BobLogin or Register
NewsCustom SearchContactLinks
Scripts for creating of a deployment script of database object through SQL scripts
ORACLE STUFFS
11-Aug-2013
Sometimes it happens you want to create package script and the tool you can use doesn't satisfy your needs. Sometimes it happens you need to embed the creation scripts into script independent on any such tools. For these case I stored simple script extraction scripts in the article.


Packages

Script: PKG2SQL.sql

DECLARE
  PAR_OWNER     VARCHAR2(30):=USER;
  PAR_MASK      varchar2(30):='BWTA%';
Begin
  DBMS_OUTPUT.ENABLE(1000000);
  For r1 in(
    With C as(
      SELECT 
        LPAD('-',70,'-')||chr(10)||'-- ' as P1
       ,'--'||chr(10)||LPAD('-',70,'-')||chr(10)||'Create or replace ' as P2   

...more


Views

Script: VIEW2SQL.sql

Declare  
  c_owner varchar2(30):= user; 
  c_mask  varchar2(30):='%'; 
  v_text VARCHAR2(32656); 
Begin 
  DBMS_OUTPUT.ENABLE(1000000); 
  for r1 in (
    select owner,view_name,text_length 
    from all_views 
    where owner=c_owner and view_name like C_MASK 

...more
Ludek Bob Jankovsky
All Right Reserved © 2007, Designed by Bob Jankovsky