--------------------------------------------------------
-- Pregatire schema pentru ROAAUTO                    --
-- Created by marius.atanasiu on 2/2/2006, 9:42:17 AM --
--------------------------------------------------------

spool curatare_schema.log

PROMPT
PROMPT	Droping views
PROMPT	=============
PROMPT
declare
 cursor crsviewuri is
        select view_name from user_views where view_name like 'DEV_%';
 linie_view crsviewuri%rowtype;
begin
 open crsviewuri;
 loop
     fetch crsviewuri into linie_view;
     exit when crsviewuri%notfound;
     execute immediate 'DROP VIEW '||linie_view.view_name;
 end loop;
end;
/

PROMPT
PROMPT	Droping materialized view mv_ordl_sume_act
PROMPT	==========================================
PROMPT
drop materialized view mv_ordl_sume_act
/

PROMPT
PROMPT	Droping materialized view log on act
PROMPT	====================================
PROMPT
drop materialized view log on act
/

PROMPT
PROMPT	Droping materialized view mv_ordl_man
PROMPT	=====================================
PROMPT
drop materialized view MV_ORDL_MAN
/

PROMPT
PROMPT	Droping materialized view log on dev_oper
PROMPT	=========================================
PROMPT
drop materialized view log on dev_oper
/

PROMPT
PROMPT	Droping materialized view log on rul
PROMPT	====================================
PROMPT
drop materialized view log on rul
/

PROMPT
PROMPT	Droping materialized view mv_ordl_mat
PROMPT	=====================================
PROMPT
drop materialized view mv_ordl_mat
/

prompt
prompt Droping table DEV_CONTRACTE
prompt ===========================
prompt
drop table DEV_CONTRACTE;

prompt
prompt Droping table DEV_FACTURI
prompt ==========================
prompt
drop table DEV_FACTURI;

prompt
prompt Droping table DEV_NOM_FURNIZORIMASINI
prompt =====================================
prompt
drop table DEV_NOM_FURNIZORIMASINI;

prompt
prompt Droping table DEV_NOM_MARCI
prompt ===========================
prompt
drop table DEV_NOM_MARCI;

prompt
prompt Droping table DEV_NOM_MASINI
prompt ============================
prompt
drop table DEV_NOM_MASINI;

prompt
prompt Droping table DEV_TIPURI_MOTOARE
prompt ================================
prompt
drop table DEV_TIPURI_MOTOARE;

prompt
prompt Droping table DEV_MASINICLIENTI
prompt ===============================
prompt
drop table DEV_MASINICLIENTI;

prompt
prompt Droping table DEV_MECANICI
prompt ==========================
prompt
drop table DEV_MECANICI;

prompt
prompt Droping table DEV_NOM_ANSAMBLE
prompt ==============================
prompt
drop table DEV_NOM_ANSAMBLE;

prompt
prompt Droping table DEV_NOM_ASIGURATORI
prompt =================================
prompt
drop table DEV_NOM_ASIGURATORI;

prompt
prompt Droping table DEV_NOM_DELEGATI
prompt ==============================
prompt
drop table DEV_NOM_DELEGATI;

prompt
prompt Droping table DEV_NOM_INSPECTORI
prompt ================================
prompt
drop table DEV_NOM_INSPECTORI;

prompt
prompt Droping table DEV_NOM_NORME
prompt ===========================
prompt
drop table DEV_NOM_NORME;

prompt
prompt Droping table DEV_NOM_PRETURI
prompt =============================
prompt
drop table DEV_NOM_PRETURI;

prompt
prompt Droping table DEV_NOM_RESP
prompt ==========================
prompt
drop table DEV_NOM_RESP;

prompt
prompt Droping table DEV_ORDL
prompt ======================
prompt
drop table DEV_ORDL;

prompt
prompt Droping table DEV_OPER
prompt ======================
prompt
drop table DEV_OPER;

prompt
prompt Droping table DEV_OPER_MECANICI
prompt ===============================
prompt
drop table DEV_OPER_MECANICI;

prompt
prompt Droping table DEV_REVIZII
prompt =========================
prompt
drop table DEV_REVIZII;

prompt
prompt Droping table DEV_TIP_DEVIZ
prompt ===========================
prompt
drop table DEV_TIP_DEVIZ;

prompt
prompt Droping sequence SEQ_DEV_COMANDA
prompt ================================
prompt
drop sequence SEQ_DEV_COMANDA;

prompt
prompt Droping sequence SEQ_DEV_MASINICLIENTI
prompt ======================================
prompt
drop sequence SEQ_DEV_MASINICLIENTI;

prompt
prompt Droping sequence SEQ_DEV_MECANICI
prompt =================================
prompt
drop sequence SEQ_DEV_MECANICI;

prompt
prompt Droping sequence SEQ_DEV_NOM_ANSAMBLE
prompt =====================================
prompt
drop sequence SEQ_DEV_NOM_ANSAMBLE;

prompt
prompt Droping sequence SEQ_DEV_NOM_ASIGURATORI
prompt ========================================
prompt
drop sequence SEQ_DEV_NOM_ASIGURATORI;

prompt
prompt Droping sequence SEQ_DEV_NOM_DELEGATI
prompt =====================================
prompt
drop sequence SEQ_DEV_NOM_DELEGATI;

prompt
prompt Droping sequence SEQ_DEV_NOM_FURNIZORIMASINI
prompt ============================================
prompt
drop sequence SEQ_DEV_NOM_FURNIZORIMASINI;

prompt
prompt Droping sequence SEQ_DEV_NOM_INSPECTORI
prompt =======================================
prompt
drop sequence SEQ_DEV_NOM_INSPECTORI;

prompt
prompt Droping sequence SEQ_DEV_NOM_MARCI
prompt ==================================
prompt
drop sequence SEQ_DEV_NOM_MARCI;

prompt
prompt Droping sequence SEQ_DEV_NOM_MASINI
prompt ===================================
prompt
drop sequence SEQ_DEV_NOM_MASINI;

prompt
prompt Droping sequence SEQ_DEV_NOM_NORME
prompt ==================================
prompt
drop sequence SEQ_DEV_NOM_NORME;

prompt
prompt Droping sequence SEQ_DEV_NOM_PRETURI
prompt ====================================
prompt
drop sequence SEQ_DEV_NOM_PRETURI;

prompt
prompt Droping sequence SEQ_DEV_NOM_RESP
prompt =================================
prompt
drop sequence SEQ_DEV_NOM_RESP;

prompt
prompt Droping sequence SEQ_DEV_OPER
prompt =============================
prompt
drop sequence SEQ_DEV_OPER;

prompt
prompt Droping sequence SEQ_DEV_OPER_MECANICI
prompt ======================================
prompt
drop sequence SEQ_DEV_OPER_MECANICI;

prompt
prompt Droping sequence SEQ_DEV_ORDL
prompt =============================
prompt
drop sequence SEQ_DEV_ORDL;

prompt
prompt Droping sequence SEQ_DEV_TIP_DEVIZ
prompt ==================================
prompt
drop sequence SEQ_DEV_TIP_DEVIZ;

prompt
prompt Droping sequence SEQ_DEV_TIPURI_MOTOARE
prompt =======================================
prompt
drop sequence SEQ_DEV_TIPURI_MOTOARE;

spool off