General discussion


Reverse Engineering

Have anyone of you in this forum worked on situations where you had generate DML/DDL for upgrades. I have seen scripts which just lists the differences. I am looking for scripts that might help in comparison and generation of the actual ddl/dml. Anyhelp is appreciated. The DDL/DML that I am looking for is as a result of running a comparison between two databases. One production database and the other with changes that need to make it to the production database.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

All the time

by swstephe In reply to Reverse Engineering

My favorite is, (for Oracle):

set rows 999;
spool drop.sql;
/* disable all constraints */
select 'alter table '||table_name
||' disable constraint '||constraint_name||';'
from user_constraints;
/* drop all objects */
select 'drop'||object_name||' '||object_type||';'
from user_objects;
spool off;

Related Discussions

Related Forums