dbUpgrade4_0025-to-4_0026_oracle.sql 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. -- Licensed Materials - Property of IBM
  2. --
  3. -- BI and PM: CM
  4. --
  5. -- (C) Copyright IBM Corp. 2008, 2009
  6. --
  7. -- US Government Users Restricted Rights - Use, duplication or disclosure
  8. -- restricted by GSA ADP Schedule Contract with IBM Corp.
  9. -- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. -- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  12. create index IDX_CREATED on CMOBJECTS(CREATED);
  13. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  14. !AddPISQL "drop index IDX_CMUNIQUENAMES_CMID" "ignoreErrors"
  15. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  16. drop table CMUNIQUENAMES;
  17. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  18. drop table CMTMPDELNAMES;
  19. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  20. drop trigger CMOBJECTS_ONMOVE_TR;
  21. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  22. drop trigger CMOBJECTS_ONDELETE_TR;
  23. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  24. create or replace trigger CMOBJNAMES_INSORUPD_TR instead of insert on CMOBJNAMES
  25. begin
  26. update CMOBJNAMES_BASE set NAME=:new.NAME, MAPDLOCALEID=:new.MAPDLOCALEID where CMID=:new.CMID and LOCALEID=:new.LOCALEID;
  27. if (sql%rowcount = 0) then
  28. insert into CMOBJNAMES_BASE (CMID, LOCALEID, NAME, MAPDLOCALEID, ISDEFAULT) values (:new.CMID, :new.LOCALEID, :new.NAME, :new.MAPDLOCALEID, :new.ISDEFAULT);
  29. end if;
  30. end;
  31. /
  32. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  33. drop trigger CMOBJNAMES_HELPER_TR;
  34. --CMSCRIPT_UPGRADE_SKIP_COMMAND(3.0068,4.0001)
  35. drop procedure CMRECONCILE_NAMES;