dbUpgrade4_0005-to-4_0006_db2.sql 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. create table CMOBJPROPS51 (
  12. CMID integer not null ,
  13. SERVERGROUP varchar (512),
  14. RUNASOWNER decimal(1,0),
  15. CANBURST decimal(1,0),
  16. SCHEDTRIGNAME varchar(255),
  17. CONSTRAINT PK_CMOBJPROPS51 PRIMARY KEY (CMID)
  18. )
  19. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (19))
  20. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (80))
  21. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (37))
  22. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (10))
  23. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (139))
  24. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (85))
  25. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (87))
  26. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (151))
  27. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (152))
  28. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (153))
  29. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (154))
  30. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (39))
  31. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (1))
  32. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (33))
  33. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (18))
  34. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (17))
  35. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (55))
  36. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (4))
  37. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (34))
  38. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (14))
  39. insert into CMOBJPROPS51 (CMID,SERVERGROUP,RUNASOWNER,CANBURST,SCHEDTRIGNAME) select p.CMID, p.SERVERGROUP, p.RUNASOWNER, p.CANBURST, p.SCHEDTRIGNAME from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (187))
  40. alter table CMOBJPROPS9 add column CANBURST decimal(1,0)
  41. update CMOBJPROPS9 set CANBURST = (select CANBURST from CMOBJPROPS11 where CMOBJPROPS9.CMID = CMID)
  42. CREATE TABLE CMOBJPROPS52 (
  43. CMID integer NOT NULL ,
  44. CONNECTSTR varchar (2048),
  45. ISOLEVEL smallint,
  46. QUALIFIER smallint,
  47. REPLACEMENT varchar (512),
  48. CLOSECONNECTCMD clob(1M),
  49. OPENCONNECTCMD clob(1M),
  50. CLOSESESSCMD clob(1M),
  51. OPENSESSCMD clob(1M),
  52. CONSTRAINT PK_CMOBJPROPS52 PRIMARY KEY (CMID)
  53. )
  54. insert into CMOBJPROPS52 (CMID,CLOSECONNECTCMD,OPENCONNECTCMD,CLOSESESSCMD,OPENSESSCMD) select p.CMID, p.CLOSECONNECTCMD, p.OPENCONNECTCMD, p.CLOSESESSCMD, p.OPENSESSCMD from CMOBJPROPS26 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (9))
  55. insert into CMOBJPROPS52 (CMID,CLOSECONNECTCMD,OPENCONNECTCMD,CLOSESESSCMD,OPENSESSCMD) select p.CMID, p.CLOSECONNECTCMD, p.OPENCONNECTCMD, p.CLOSESESSCMD, p.OPENSESSCMD from CMOBJPROPS26 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (12))
  56. insert into CMOBJPROPS52 (CMID,QUALIFIER,REPLACEMENT) select p.CMID, p.QUALIFIER, p.REPLACEMENT from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (42))
  57. update CMOBJPROPS52 set CONNECTSTR = (select CONNECTSTR from CMOBJPROPS11 where CMOBJPROPS52.CMID = CMID), ISOLEVEL = (select ISOLEVEL from CMOBJPROPS11 where CMOBJPROPS52.CMID = CMID)
  58. CREATE TABLE CMOBJPROPS53 (
  59. CMID integer NOT NULL ,
  60. SEQUENCING smallint,
  61. CONSTRAINT PK_CMOBJPROPS53 PRIMARY KEY (CMID)
  62. )
  63. insert into CMOBJPROPS53 (CMID,SEQUENCING) select p.CMID, p.SEQUENCING from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (55))
  64. alter table CMOBJPROPS28 add column SEQUENCING smallint add column ALLOWNOTIFICATION decimal(1,0)
  65. insert into CMOBJPROPS28 (CMID,ALLOWNOTIFICATION) select p.CMID, p.ALLOWNOTIFICATION from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (87))
  66. update CMOBJPROPS28 set SEQUENCING = (select SEQUENCING from CMOBJPROPS11 where CMOBJPROPS28.CMID = CMID), ALLOWNOTIFICATION = (select ALLOWNOTIFICATION from CMOBJPROPS11 where CMOBJPROPS28.CMID = CMID)
  67. alter table CMOBJPROPS48 add column CAPACITY float add column LOADBALMODE smallint
  68. update CMOBJPROPS48 set CAPACITY = (select CAPACITY from CMOBJPROPS11 where CMOBJPROPS48.CMID = CMID), LOADBALMODE = (select LOADBALMODE from CMOBJPROPS11 where CMOBJPROPS48.CMID = CMID)
  69. alter table CMOBJPROPS50 add column LASTPAGE varchar(512)
  70. update CMOBJPROPS50 set LASTPAGE = (select LASTPAGE from CMOBJPROPS11 where CMOBJPROPS50.CMID = CMID)
  71. CREATE TABLE CMOBJPROPS54 (
  72. CMID integer NOT NULL ,
  73. FORMAT smallint,
  74. OLOCALEID smallint,
  75. CONSTRAINT PK_CMOBJPROPS54 PRIMARY KEY (CMID)
  76. )
  77. insert into CMOBJPROPS54 (CMID,FORMAT,OLOCALEID) select p.CMID, p.FORMAT, p.OLOCALEID from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (11))
  78. insert into CMOBJPROPS54 (CMID,FORMAT,OLOCALEID) select p.CMID, p.FORMAT, p.OLOCALEID from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (179))
  79. insert into CMOBJPROPS54 (CMID,FORMAT,OLOCALEID) select p.CMID, p.FORMAT, p.OLOCALEID from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (183))
  80. insert into CMOBJPROPS54 (CMID,FORMAT,OLOCALEID) select p.CMID, p.FORMAT, p.OLOCALEID from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (27))
  81. insert into CMOBJPROPS54 (CMID,FORMAT,OLOCALEID) select p.CMID, p.FORMAT, p.OLOCALEID from CMOBJPROPS11 p where p.CMID in (select o.CMID from CMOBJECTS o where o.CLASSID in (5))
  82. delete from CMOBJPROPS26 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (9))
  83. delete from CMOBJPROPS26 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (12))
  84. alter table CMOBJPROPS26 drop constraint PK_CMOBJPROPS26
  85. rename CMOBJPROPS26 to CMOBJPROPS26_OLD
  86. CREATE TABLE CMOBJPROPS26 (
  87. CMID integer not null,
  88. DELIVOPTIONS clob(1M),
  89. constraint PK_CMOBJPROPS26 primary key (CMID)
  90. )
  91. insert into CMOBJPROPS26(CMID, DELIVOPTIONS) select CMID, DELIVOPTIONS from CMOBJPROPS26_OLD
  92. drop table CMOBJPROPS26_OLD
  93. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (1))
  94. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (4))
  95. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (5))
  96. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (9))
  97. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (10))
  98. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (11))
  99. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (14))
  100. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (17))
  101. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (18))
  102. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (19))
  103. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (27))
  104. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (33))
  105. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (34))
  106. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (37))
  107. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (39))
  108. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (42))
  109. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (55))
  110. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (80))
  111. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (85))
  112. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (87))
  113. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (139))
  114. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (151))
  115. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (152))
  116. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (153))
  117. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (154))
  118. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (179))
  119. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (183))
  120. delete from CMOBJPROPS11 where CMID in (select o.CMID from CMOBJECTS o where CLASSID in (187))
  121. alter table CMOBJPROPS11 drop constraint PK_CMOBJPROPS11
  122. rename CMOBJPROPS11 to CMOBJPROPS11_OLD
  123. create table CMOBJPROPS11 (
  124. CMID integer not null ,
  125. STATUSID smallint,
  126. EVENTID varchar(45),
  127. OWNEREVENTID varchar(45),
  128. CONSTRAINT PK_CMOBJPROPS11 PRIMARY KEY (CMID)
  129. )
  130. insert into CMOBJPROPS11(CMID, STATUSID, EVENTID, OWNEREVENTID) select CMID, STATUSID, EVENTID, OWNEREVENTID from CMOBJPROPS11_OLD
  131. drop table CMOBJPROPS11_OLD