---todo 11177


-------------------------STOP-----------------------

begin
execute immediate ('DROP INDEX XIF1STOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF2STOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF3STOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF4STOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF5STOP');
exception when others then null;
end;
/


begin
execute immediate ('CREATE INDEX XIF1STOP ON STOP (ROUTECONTROL_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF2STOP ON STOP (ROUTESTOP_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF3STOP ON STOP (CUSTOMER_LINK_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF4STOP ON STOP (MOVEDTOSTOP_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF5STOP ON STOP (REASONCODE_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

ALTER INDEX XPKSTOP REBUILD TABLESPACE INDX;

-----------------------ROUTESTOP---------------

begin
execute immediate ('DROP INDEX XIE1ROUTESTOP');
exception when others then null;
end;
/
 
begin
execute immediate ('DROP INDEX XIF6ROUTESTOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF852ROUTESTOP');
exception when others then null;
end;
/
 
begin
execute immediate ('DROP INDEX XIF853ROUTESTOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF854ROUTESTOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF855ROUTESTOP');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF901ROUTESTOP');
exception when others then null;
end;
/


begin
execute immediate ('CREATE INDEX XIE1ROUTESTOP ON ROUTESTOP (ROUTE_ID, STOPNUMBER)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF6ROUTESTOP ON ROUTESTOP (SPECIFICSORTBATCHDEFINITION_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF852ROUTESTOP ON ROUTESTOP (ROUTE_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF853ROUTESTOP ON ROUTESTOP (CUSTOMER_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF854ROUTESTOP ON ROUTESTOP (CONTACTPERSON_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF855ROUTESTOP ON ROUTESTOP (DELIVERYPOINT_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF901ROUTESTOP ON ROUTESTOP (RETURNROUTE_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

ALTER INDEX XPKROUTESTOP REBUILD TABLESPACE INDX;

ALTER INDEX XAK1ROUTESTOP REBUILD TABLESPACE INDX;

-------------------ISAPEXPORT---------------------
begin
execute immediate ('DROP INDEX XIE1ISAPEXPORT');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF1ISAPEXPORT');
exception when others then null;
end;
/


begin
execute immediate ('CREATE INDEX XIE1ISAPEXPORT ON ISAPEXPORT (BUSINESSUNIT_ID, EXPORTED, EXPORTTIMESTAMP)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF1ISAPEXPORT ON ISAPEXPORT (BUSINESSUNIT_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

ALTER INDEX XPKISAPEXPORT REBUILD TABLESPACE INDX;

-------------------CUSTOMERUSERINSTRUCTION_DESC------------

begin
execute immediate ('DROP INDEX XIF1CUSTOMERUSERINSTRUCTION_DE');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF2CUSTOMERUSERINSTRUCTION_DE');
exception when others then null;
end;
/


begin
  execute immediate ('CREATE INDEX XIF1CUSTOMERUSERINSTRUCTION_DE ON CUSTOMERUSERINSTRUCTION_DESC (CUSTOMERUSERINSTRUCTION_ID) TABLESPACE INDX');
exception
  when others then
    null;
end;
/

begin
execute immediate ('CREATE INDEX XIF2CUSTOMERUSERINSTRUCTION_DE ON CUSTOMERUSERINSTRUCTION_DESC (LANGUAGE_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

ALTER INDEX XPKCUSTOMERUSERINSTRUCTION_DES REBUILD TABLESPACE INDX;


---------------------GENERALUSERINSTRUCTION_DESC-------------

begin
execute immediate ('DROP INDEX XIF1GENERALUSERINSTRUCTION_DE');
exception when others then null;
end;
/

begin
execute immediate ('DROP INDEX XIF2GENERALUSERINSTRUCTION_DE');
exception when others then null;
end;
/


begin
execute immediate ('CREATE INDEX XIF1GENERALUSERINSTRUCTION_DE ON GENERALUSERINSTRUCTION_DESC (GENERALUSERINSTRUCTION_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

begin
execute immediate ('CREATE INDEX XIF2GENERALUSERINSTRUCTION_DE ON GENERALUSERINSTRUCTION_DESC (LANGUAGE_ID)
  TABLESPACE INDX');
exception when others then null;
end;
/

ALTER INDEX XPKGENERALUSERINSTRUCTION_DES REBUILD TABLESPACE INDX;


--------------------DBCONSISTENCYCHECK-------------

ALTER INDEX XPKDBCONSISTENCYCHECK REBUILD TABLESPACE INDX;

