dbClean_mssqlserver.sql 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. -- Licensed Materials - Property of IBM
  2. --
  3. -- BI and PM: CM
  4. --
  5. -- (C) Copyright IBM Corp. 2008, 2019
  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. IF EXISTS (select CONSTRAINT_NAME from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE where TABLE_NAME = 'CMOBJECTS' and CONSTRAINT_NAME = 'FK_PARENT' and CONSTRAINT_SCHEMA = user_name())
  12. BEGIN
  13. ALTER TABLE CMOBJECTS DROP CONSTRAINT FK_PARENT
  14. END
  15. drop view CMOWNERCOUNT
  16. drop table CMOBJECTS
  17. drop table CMOBJECTS_OLD
  18. drop table CMOBJNAMES
  19. drop table CMOBJNAMES_OLD
  20. drop table CMDATA
  21. drop table CMDATA_OLD
  22. drop table CMOBJPROPS1
  23. drop table CMOBJPROPS1_OLD
  24. drop table CMOBJPROPS2
  25. drop table CMOBJPROPS2_OLD
  26. drop table CMOBJPROPS3
  27. drop table CMOBJPROPS3_OLD
  28. drop table CMOBJPROPS4
  29. drop table CMOBJPROPS4_OLD
  30. drop table CMOBJPROPS5
  31. drop table CMOBJPROPS5_OLD
  32. drop table CMOBJPROPS6
  33. drop table CMOBJPROPS6_OLD
  34. drop table CMOBJPROPS7
  35. drop table CMOBJPROPS7_OLD
  36. drop table CMOBJPROPS8
  37. drop table CMOBJPROPS8_OLD
  38. drop table CMOBJPROPS9
  39. drop table CMOBJPROPS9_OLD
  40. drop table CMOBJPROPS10
  41. drop table CMOBJPROPS10_OLD
  42. drop table CMOBJPROPS11
  43. drop table CMOBJPROPS11_OLD
  44. drop table CMOBJPROPS12
  45. drop table CMOBJPROPS12_OLD
  46. drop table CMOBJPROPS13
  47. drop table CMOBJPROPS13_OLD
  48. drop table CMOBJPROPS14
  49. drop table CMOBJPROPS14_OLD
  50. drop table CMOBJPROPS15
  51. drop table CMOBJPROPS15_OLD
  52. drop table CMOBJPROPS16
  53. drop table CMOBJPROPS16_OLD
  54. drop table CMOBJPROPS17
  55. drop table CMOBJPROPS17_OLD
  56. drop table CMOBJPROPS18
  57. drop table CMOBJPROPS18_OLD
  58. drop table CMOBJPROPS19
  59. drop table CMOBJPROPS19_OLD
  60. drop table CMOBJPROPS20
  61. drop table CMOBJPROPS20_OLD
  62. drop table CMOBJPROPS21
  63. drop table CMOBJPROPS21_OLD
  64. drop table CMOBJPROPS22
  65. drop table CMOBJPROPS22_OLD
  66. drop table CMOBJPROPS23
  67. drop table CMOBJPROPS23_OLD
  68. drop table CMOBJPROPS24
  69. drop table CMOBJPROPS24_OLD
  70. drop table CMOBJPROPS25
  71. drop table CMOBJPROPS25_OLD
  72. drop table CMOBJPROPS26
  73. drop table CMOBJPROPS26_OLD
  74. drop table CMOBJPROPS27
  75. drop table CMOBJPROPS27_OLD
  76. drop table CMOBJPROPS28
  77. drop table CMOBJPROPS28_OLD
  78. drop table CMOBJPROPS30
  79. drop table CMOBJPROPS30_OLD
  80. drop table CMOBJPROPS31
  81. drop table CMOBJPROPS31_OLD
  82. drop table CMOBJPROPS32
  83. drop table CMOBJPROPS32_OLD
  84. drop table CMOBJPROPS33
  85. drop table CMOBJPROPS33_OLD
  86. drop table CMOBJPROPS34
  87. drop table CMOBJPROPS34_OLD
  88. drop table CMOBJPROPS35
  89. drop table CMOBJPROPS35_OLD
  90. drop table CMOBJPROPS36
  91. drop table CMOBJPROPS36_OLD
  92. drop table CMOBJPROPS37
  93. drop table CMOBJPROPS37_OLD
  94. drop table CMOBJPROPS38
  95. drop table CMOBJPROPS38_OLD
  96. drop table CMOBJPROPS39
  97. drop table CMOBJPROPS39_OLD
  98. drop table CMOBJPROPS40
  99. drop table CMOBJPROPS40_OLD
  100. drop table CMOBJPROPS41
  101. drop table CMOBJPROPS41_OLD
  102. drop table CMOBJPROPS42
  103. drop table CMOBJPROPS42_OLD
  104. drop table CMOBJPROPS43
  105. drop table CMOBJPROPS43_OLD
  106. drop table CMOBJPROPS44
  107. drop table CMOBJPROPS44_OLD
  108. drop table CMOBJPROPS45
  109. drop table CMOBJPROPS45_OLD
  110. drop table CMOBJPROPS46
  111. drop table CMOBJPROPS46_OLD
  112. drop table CMOBJPROPS47
  113. drop table CMOBJPROPS47_OLD
  114. drop table CMOBJPROPS48
  115. drop table CMOBJPROPS48_OLD
  116. drop table CMOBJPROPS49
  117. drop table CMOBJPROPS49_OLD
  118. drop table CMOBJPROPS50
  119. drop table CMOBJPROPS50_OLD
  120. drop table CMOBJPROPS51
  121. drop table CMOBJPROPS51_OLD
  122. drop table CMOBJPROPS52
  123. drop table CMOBJPROPS52_OLD
  124. drop table CMOBJPROPS53
  125. drop table CMOBJPROPS53_OLD
  126. drop table CMOBJPROPS54
  127. drop table CMOBJPROPS54_OLD
  128. drop table CMOBJPROPS55
  129. drop table CMOBJPROPS55_OLD
  130. drop table CMOBJPROPS56
  131. drop table CMOBJPROPS56_OLD
  132. drop table CMOBJPROPS57
  133. drop table CMOBJPROPS57_OLD
  134. drop table CMOBJPROPS58
  135. drop table CMOBJPROPS58_OLD
  136. drop table CMOBJPROPS59
  137. drop table CMOBJPROPS59_OLD
  138. drop table CMOBJPROPS60
  139. drop table CMOBJPROPS60_OLD
  140. drop table CMOBJPROPS61
  141. drop table CMOBJPROPS61_OLD
  142. drop table CMOBJPROPS62
  143. drop table CMOBJPROPS62_OLD
  144. drop table CMOBJPROPS63
  145. drop table CMOBJPROPS63_OLD
  146. drop table CMOBJPROPS64
  147. drop table CMOBJPROPS64_OLD
  148. drop table CMOBJPROPS65
  149. drop table CMOBJPROPS65_OLD
  150. drop table CMOBJPROPS66
  151. drop table CMOBJPROPS66_OLD
  152. drop table CMOBJPROPS67
  153. drop table CMOBJPROPS67_OLD
  154. drop table CMOBJPROPS68
  155. drop table CMOBJPROPS68_OLD
  156. drop table CMOBJPROPS69
  157. drop table CMOBJPROPS69_OLD
  158. drop table CMOBJPROPS70
  159. drop table CMOBJPROPS70_OLD
  160. drop table CMOBJPROPS71
  161. drop table CMOBJPROPS71_OLD
  162. drop table CMOBJPROPS72
  163. drop table CMOBJPROPS72_OLD
  164. drop table CMOBJPROPS73
  165. drop table CMOBJPROPS73_OLD
  166. drop table CMOBJPROPS74
  167. drop table CMOBJPROPS74_OLD
  168. drop table CMOBJPROPS75
  169. drop table CMOBJPROPS75_OLD
  170. drop table CMOBJPROPS76
  171. drop table CMOBJPROPS76_OLD
  172. drop table CMOBJPROPS77
  173. drop table CMOBJPROPS77_OLD
  174. drop table CMOBJPROPS78
  175. drop table CMOBJPROPS78_OLD
  176. drop table CMOBJPROPS79
  177. drop table CMOBJPROPS79_OLD
  178. drop table CMOBJPROPS80
  179. drop table CMOBJPROPS80_OLD
  180. drop table CMOBJPROPS81
  181. drop table CMOBJPROPS81_OLD
  182. drop table CMOBJPROPS82
  183. drop table CMOBJPROPS82_OLD
  184. drop table CMOBJPROPS83
  185. drop table CMOBJPROPS83_OLD
  186. drop table CMOBJPROPS84
  187. drop table CMOBJPROPS84_OLD
  188. drop table CMOBJPROPS85
  189. drop table CMOBJPROPS85_OLD
  190. drop table CMOBJPROPS86
  191. drop table CMOBJPROPS86_OLD
  192. drop table CMOBJPROPS87
  193. drop table CMOBJPROPS87_OLD
  194. drop table CMOBJPROPS88
  195. drop table CMOBJPROPS88_OLD
  196. drop table CMOBJPROPS89
  197. drop table CMOBJPROPS89_OLD
  198. drop table CMOBJPROPS90
  199. drop table CMOBJPROPS90_OLD
  200. drop table CMOBJPROPS91
  201. drop table CMOBJPROPS91_OLD
  202. drop table CMOBJPROPS92
  203. drop table CMOBJPROPS92_OLD
  204. drop table CMOBJPROPS93
  205. drop table CMOBJPROPS93_OLD
  206. drop table CMPOLICIES
  207. drop table CMPOLICIES_OLD
  208. drop table CMVIEWED
  209. drop table CMVIEWED_OLD
  210. drop table CMDELETEDSCHEDULES
  211. drop table CMDELETEDSCHEDULES_OLD
  212. drop table CMPROPERTIES
  213. drop table CMPROPERTIES_OLD
  214. drop table CMCLASSES
  215. drop table CMCLASSES_OLD
  216. drop table CMSYSPROPS
  217. drop table CMSYSPROPS_OLD
  218. drop table CMLOCALES
  219. drop table CMLOCALES_OLD
  220. drop table CMCRYPTOKEYS
  221. drop table CMCRYPTOKEYS_OLD
  222. drop table CMCAKEYS
  223. drop table CMCAKEYS_OLD
  224. drop table CMCAPACITY
  225. drop table CMCAPACITY_OLD
  226. drop proc CMPARSEIDS
  227. drop proc CMPARSECOPYIDS
  228. drop table CMGUIDS
  229. drop table CMGUIDS_OLD
  230. drop table CMCAPROPS
  231. drop table CMCAPROPS_OLD
  232. drop table CMDBTEST
  233. drop table CMDBTEST_OLD
  234. drop table CMREFNOORD1
  235. drop table CMREFNOORD1_OLD
  236. drop table CMREFNOORD2
  237. drop table CMREFNOORD2_OLD
  238. drop table CMREFORD1
  239. drop table CMREFORD1_OLD
  240. drop table CMREFORD2
  241. drop table CMREFORD2_OLD
  242. drop table CMSTOREIDS
  243. drop table CMSTOREIDS_OLD
  244. drop table CMDATAUPGRADE
  245. drop table CMDATAUPGRADE_OLD
  246. drop table CMREFERENCES
  247. drop table CMREFERENCES_OLD
  248. drop table CMCHECKCONSISTENCY
  249. drop table CMCHECKCONSISTENCY_OLD
  250. drop table CMNOTIFICATIONTABLE
  251. drop table CMNOTIFICATIONTABLE_OLD
  252. drop table CMSIZEINFO
  253. drop table CMSIZEINFO_OLD
  254. drop table CMSPLIT
  255. drop table CMARCHIVESTATUS
  256. drop table CMARCHIVESTATUS_OLD
  257. drop table CMARCHIVEQUEUE;
  258. drop table CMARCHIVEQUEUE_OLD;
  259. drop table CMDELETEQUEUE;
  260. drop table CMDELETEQUEUE_OLD;
  261. drop table CMQUEUELOCK;
  262. drop table CMQUEUELOCK_OLD;
  263. drop table CMTENANTID;
  264. drop table CMTENANTID_OLD;
  265. drop table CMINDEXQUEUE;
  266. drop table CMTAGS;