Source: DMF/PuC/AIF/DR2/DR2_ItemValidation.sql
SELECT * FROM MIGR_ERROR ORDER BY ERROR_ID DESC;
SELECT * FROM MIGR_RULES WHERE RULE_ID = 108;
select * from migr_rule_control where table_name = 'RPM_ITEM_ZONE_PRICE' AND error_ind = 'Y';
select count(1), CTRL_STATUS from item_master_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_MASTER_TL_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from item_master_cfa_ext_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_SEASONS_CTRL group by CTRL_STATUS;
select count(1), CTRL_STATUS from item_image_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_SUPPLIER_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from item_supplier_cfa_ext_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_SUPP_COUNTRY_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from item_supp_country_cfa_ext_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_SUPP_COUNTRY_DIM_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from ITEM_SUPP_MANU_COUNTRY_ctrl group by CTRL_STATUS;
select count(1), CTRL_STATUS from RPM_ITEM_ZONE_PRICE_ctrl group by CTRL_STATUS;
update item_master_ctrl set ctrl_status = 'U' where ctrl_status in ('H','W');
select count(1) from item_master_ctrl where diff_2 = 'SIZEGROUP';
update item_master_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_MASTER_TL_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W ');
update item_master_cfa_ext_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_SEASONS_CTRL set ctrl_status = 'A' where ctrl_status in ('L','W');
update item_image_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_SUPPLIER_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update item_supplier_cfa_ext_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_SUPP_COUNTRY_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update item_supp_country_cfa_ext_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_SUPP_COUNTRY_DIM_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update ITEM_SUPP_MANU_COUNTRY_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
update RPM_ITEM_ZONE_PRICE_ctrl set ctrl_status = 'A' where ctrl_status in ('L','W');
select distinct 'exec dbms_stats.gather_table_stats('''||owner||''','''||table_name||''',granularity=>''ALL'',estimate_percent=>dbms_stats.auto_sample_size,method_opt=>''for all columns size auto'',degree=>8,cascade=>true,no_invalidate=>FALSE);' from DBA_TAB_STATISTICS where stale_stats='YES' and table_name not like 'BIN$%' and owner in ('DMF') and stattype_locked is null
union
select distinct 'exec dbms_stats.gather_table_stats('''||owner||''','''||table_name||''',granularity=>''ALL'',estimate_percent=>dbms_stats.auto_sample_size,method_opt=>''for all columns size auto'',degree=>8,cascade=>true,no_invalidate=>FALSE);' from DBA_IND_STATISTICS where stale_stats='YES' and table_name not like 'BIN$%' and owner in ('DMF') and stattype_locked is null order by 1;