Hi,
I am using ORACLE DB 11gR2. I am comparing all tables of 2 schemas with the below method :-
select dbms_metadata_diff.compare_alter('TABLE',
'GROUPS_A',
'GROUPS_A',
'INTTEST01',
'INTTEST02')
-- into V_ALTER
from dual;
Which give me an output like :-
ALTER TABLE "INTTEST01"."GROUPS_A" DROP ("RECORD_STATUS_TYPE");
ALTER TABLE "INTTEST01"."GROUPS_A" ADD ("RAW_RECORD_STATUS_TYPE");
-- ORA-39278: Cannot alter table with segments to segment creation deferred.
The table structure of both the tables in their schema :-
INTTEST01 :- GROUPS_A :-
ID number
RECORD_STATUS_TYPE varchar2(40)
INTTEST01 :- GROUPS_A :-
ID number
RAW_RECORD_STATUS_TYPE varchar2(40)
As per the expectation it should have given me an "ALTER TABLE RENAME" command to rename the column from RECORD_STATUS_TYPE to RAW_RECORD_STATUS_TYPE.
On the other side it gives me DROP COLUMN and ADD COLUMN in which i will loose my important data.
Can anyone please tell me a
clear picture about the dbms_metadata_diff.compare_alter package , in which case will this return me an "ALTER TABLE RENAME COLUMN" command.
Thanks in Advance.