Need help in creating script

2 views
Skip to first unread message

reach manju

unread,
Aug 27, 2010, 11:35:50 PM8/27/10
to korn...@googlegroups.com
Hi Team,

Here is the Scenario / requirement

When we submit the DDL to the DBA, DBA do the Change request. 
=> We need to automate the process of verifying if all the DDL are implemented properly.

Need to create a script that reads the DDL statements, parse it and extract required fields(like table name, column name etc) and do a Select against Data dictionaries like USER_TABLES, USER_TAB_COLUMNS, USER_CONSTRAINTS
If it matches with the Data dictionary tables then say "Verification Success" else show the difference.
 
for example:
following are the DDL statement submitted to DBA -
(and DBA has already implemented the changes to DB tables)
ALTER TABLE supplier
ADD supplier_name  varchar2(50);

ALTER TABLE suppliers
RENAME TO vendors;

ALTER TABLE supplier
ADD (    supplier_name    varchar2(50),
     city    varchar2(45) );
    
ALTER TABLE supplier
MODIFY supplier_name   varchar2(100)     not null;
 
ALTER TABLE supplier
MODIFY (supplier_name    varchar2(100)    not null,
city    varchar2(75)          );

ALTER TABLE supplier
DROP COLUMN supplier_name;
 
ALTER TABLE supplier
RENAME COLUMN supplier_name to sname;

These need to be verified against different Data dictionary tables.

How can we implement this?

Thanks in advance

Reply all
Reply to author
Forward
0 new messages