REM This script flags objects to be reloaded for 4_7 Upgrade

DECLARE

BEGIN



-- THE FOLLOWING PATCHES HAVE BEEN ROLLED IN
--
-- PATCH   OWNER      CI_TYPE                  CI_FILENAME    CI_NAME              CI_STAGE
-- =====   ========   ======================   ============   ==================   ========
-- 001     STLYON     PACKAGE BODY             ciprs.opb      CIOPREFERENCE_SET    CKPACK
--                    also META
--
-- 002     STLYON     PACKAGE BODY             ciarg.hpb      CIHARG               CKPACK
--                    PACKAGE BODY             ciarg.opb      CIOMODULE_ARGUMENT   CKPACK
--                    PACKAGE BODY             ciccd.opb      CIOCLUSTER_COLUMN    CKPACK
--                    PACKAGE BODY             cicol.hpb      CIHCOL               CKPACK
--                    PACKAGE BODY             cidom.hpb      CIHDOM               CKPACK
--                    PACKAGE BODY             cioct.hpb      CIHOCT               CKPACK
--                    PACKAGE BODY             cipgd.hpb      CIHPGD               CKPACK
--                    PACKAGE BODY             cipgd.opb      CIOPROGRAM_DATUM     CKPACK
--                    PACKAGE BODY             ciplm.opb      CIOPLSQL_MODULE      CKPACK
--                    PACKAGE BODY             ciutl.ipb      CIIUTL               CKPACCOM
--                    also META
--
-- 003     STLYON     only META
--
-- 004     AMITKUM    only META
--
-- 005 (empty)
--
-- 006     LOLDHAM    PACKAGE BODY             jriversn.jpb   JR_VERSION           JRPACK
--
-- 007     STLYON     only META
--
-- 008     CRATHOD    only META
--
-- 009     STLYON     PACKAGE                  ckreputl.hps   CK_REP_UTIL          CKPACK
--                    PACKAGE BODY             ckreputl.hpb   CK_REP_UTIL          CKPACK
--                    TABLE                                   CK_REPORT_FOLDERS    CKTABS
--                    PRIMARY KEY CONSTRAINT                  CK_RPT_FOLDERS_PK    CKCONST
--
-- 010     CRATHOD    only META
--
-- 011     KPARTHAS   PACKAGE BODY             odwalpad.pkb   ODWALPAD             CKROBPAC
--                    PACKAGE BODY             odwapred.pkb   ODWAPRED             CKROBPAC
--                    PACKAGE BODY             odwasrch.pkb   ODWASRCH             CKROBPAC
--                    PACKAGE                  rob_msg.pks    ROB_MSG              CKROBPAC
--                    PACKAGE BODY             rob_msg.pkb    ROB_MSG              CKROBPAC
--
-- 012     AFACKERE   PACKAGE BODY             ciacc.ipb      CIIACC               CKPACCOM
--                    PACKAGE BODY             cifun.hpb      CIHFUN               CKPACK
--                    PACKAGE BODY             jrcopy.jpb     JR_COPY              JRPACK





-- UPDATES THE OBJECTS IN THE FOLLOWING STAGES
-- CKCONST
-- CKPACCOM -- already done
-- CKPACK -- already done
-- CKTABS -- already done
-- JRPACK -- already done





  -- UPDATE FOR PACKAGE SPECS
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'PACKAGE'
  AND    CI_NAME IN ( 'CK_REP_UTIL'
                    , 'ROB_MSG' );





  -- UPDATE FOR PACKAGE BODIES
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'PACKAGE BODY'
  AND    CI_NAME IN ( 'CIOPREFERENCE_SET'
                    , 'CIHARG'
                    , 'CIOMODULE_ARGUMENT'
                    , 'CIOCLUSTER_COLUMN'
                    , 'CIHCOL'
                    , 'CIHDOM'
                    , 'CIHOCT'
                    , 'CIHPGD'
                    , 'CIOPROGRAM_DATUM'
                    , 'CIOPLSQL_MODULE'
                    , 'CIIUTL'
                    , 'JR_VERSION'
                    , 'CK_REP_UTIL'
                    , 'ODWALPAD'
                    , 'ODWAPRED'
                    , 'ODWASRCH'
                    , 'ROB_MSG'
                    , 'CIIACC'
                    , 'CIHFUN'
                    , 'JR_COPY' );





  -- UPDATE FOR TABLES
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'TABLE'
  AND    CI_NAME IN ( 'CK_REPORT_FOLDERS' );





  -- UPDATE FOR CONSTRAINTS
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'R'
  WHERE  CI_TYPE    = 'CONSTRAINT'
  AND    CI_NAME IN ( 'CK_RPT_FOLDERS_PK' );





  -- Update for verify of stage
  UPDATE CK_INSTALLED_OBJECTS
  SET    CI_CREATED = 'Y'
  WHERE  CI_STAGE   = 'CKUPD4_7';



  COMMIT;



EXCEPTION

  WHEN OTHERS THEN
    dbms_output.put_line('* Exception Raised  ');
    dbms_output.put_line('...ERROR: '||substrb(sqlerrm,1,240));
    rollback work;
    RAISE;

END;
/
