home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / i386 / dropall.sql < prev    next >
Encoding:
Text File  |  1995-12-07  |  27.7 KB  |  717 lines

  1.  
  2. -- - ----
  3. /*
  4. ** DROPALL.SQL         1995/12/06 17:51
  5. **
  6. ** Removes all system procedures, catalog procedures, extended procedures,
  7. ** etc. in preparation for an upgrade.
  8. **
  9. ****************************************************************************
  10. ** Copyright (C) 1994, 1995, 1996 - Microsoft Corporation                  *
  11. ****************************************************************************
  12. */
  13.  
  14. go
  15. use master
  16. set nocount on
  17. go
  18.  
  19. dump tran master with no_log
  20. go
  21. print ''
  22. print 'Dropping stored procedures'
  23. print ''
  24. go
  25.  
  26. if exists (select * from sysobjects where name = 'MS_sqlctrs_locks' and sysstat & 0xf = 4)
  27.     drop proc MS_sqlctrs_locks
  28. go
  29. if exists (select * from sysobjects where name = 'MS_sqlctrs_users' and sysstat & 0xf = 4)
  30.     drop proc MS_sqlctrs_users
  31. go
  32. if exists (select * from sysobjects where name = 'sp_column_privileges' and sysstat & 0xf = 4)
  33.     drop proc sp_column_privileges
  34. go
  35. if exists (select * from sysobjects where name = 'sp_columns' and sysstat & 0xf = 4)
  36.     drop proc sp_columns
  37. go
  38. if exists (select * from sysobjects where name = 'sp_databases' and sysstat & 0xf = 4)
  39.     drop proc sp_databases
  40. go
  41. if exists (select * from sysobjects where name = 'sp_datatype_info' and sysstat & 0xf = 4)
  42.     drop proc sp_datatype_info
  43. go
  44. if exists (select * from sysobjects where name = 'sp_fkeys' and sysstat & 0xf = 4)
  45.     drop proc sp_fkeys
  46. go
  47.  
  48. /*
  49. if exists (select * from sysobjects where name = 'sp_helpsql' and sysstat & 0xf = 4)
  50.     drop proc sp_helpsql
  51. */
  52.  
  53. dump tran master with no_log
  54. go
  55. if exists (select * from sysobjects where name = 'sp_pkeys' and sysstat & 0xf = 4)
  56.     drop proc sp_pkeys
  57. go
  58. if exists (select * from sysobjects where name = 'sp_server_info' and sysstat & 0xf = 4)
  59.     drop proc sp_server_info
  60. go
  61. if exists (select * from sysobjects where name = 'sp_special_columns' and sysstat & 0xf = 4)
  62.     drop proc sp_special_columns
  63. go
  64. if exists (select * from sysobjects where name = 'sp_sproc_columns' and sysstat & 0xf = 4)
  65.     drop proc sp_sproc_columns
  66. go
  67. if exists (select * from sysobjects where name = 'sp_statistics' and sysstat & 0xf = 4)
  68.     drop proc sp_statistics
  69. go
  70. if exists (select * from sysobjects where name = 'sp_stored_procedures' and sysstat & 0xf = 4)
  71.     drop proc sp_stored_procedures
  72. go
  73. if exists (select * from sysobjects where name = 'sp_table_privileges' and sysstat & 0xf = 4)
  74.     drop proc sp_table_privileges
  75. go
  76. if exists (select * from sysobjects where name = 'sp_tables' and sysstat & 0xf = 4)
  77.     drop proc sp_tables
  78. go
  79. if exists (select * from sysobjects where name = 'sp_abort_xact' and sysstat & 0xf = 4)
  80.     drop procedure sp_abort_xact
  81. go
  82. if exists (select * from sysobjects where name = 'sp_addalias' and sysstat & 0xf = 4)
  83.     drop procedure sp_addalias
  84. go
  85. if exists (select * from sysobjects where name = 'sp_addarticle' and sysstat & 0xf = 4)
  86.     drop procedure sp_addarticle
  87. go
  88. if exists (select * from sysobjects where name = 'sp_addpublisher' and sysstat & 0xf = 4)
  89.     drop procedure sp_addpublisher
  90. go
  91. if exists (select * from sysobjects where name = 'sp_articlecolumn' and sysstat & 0xf = 4)
  92.     drop procedure sp_articlecolumn
  93. go
  94. if exists (select * from sysobjects where name = 'sp_addextendedproc' and sysstat & 0xf = 4)
  95.     drop procedure sp_addextendedproc
  96. go
  97. if exists (select * from sysobjects where name = 'sp_addgroup' and sysstat & 0xf = 4)
  98.     drop procedure sp_addgroup
  99. go
  100. if exists (select * from sysobjects where name = 'sp_addlanguage' and sysstat & 0xf = 4)
  101.     drop procedure sp_addlanguage
  102. go
  103. if exists (select * from sysobjects where name = 'sp_addlogin' and sysstat & 0xf = 4)
  104.     drop procedure sp_addlogin
  105. go
  106. if exists (select * from sysobjects where name = 'sp_addmessage' and sysstat & 0xf = 4)
  107.     drop procedure sp_addmessage
  108. go
  109. if exists (select * from sysobjects where name = 'sp_altermessage' and sysstat & 0xf = 4)
  110.     drop procedure sp_altermessage
  111. go
  112. if exists (select * from sysobjects where name = 'sp_addpublication' and sysstat & 0xf = 4)
  113.     drop procedure sp_addpublication
  114. go
  115. if exists (select * from sysobjects where name = 'sp_addremotelogin' and sysstat & 0xf = 4)
  116.     drop procedure sp_addremotelogin
  117. go
  118. if exists (select * from sysobjects where name = 'sp_addsegment' and sysstat & 0xf = 4)
  119.     drop procedure sp_addsegment
  120. go
  121. if exists (select * from sysobjects where name = 'sp_addserver' and sysstat & 0xf = 4)
  122.     drop procedure sp_addserver
  123. go
  124. if exists (select * from sysobjects where name = 'sp_addsubscriber' and sysstat & 0xf = 4)
  125.     drop procedure sp_addsubscriber
  126. go
  127. if exists (select * from sysobjects where name = 'sp_addsubscription' and sysstat & 0xf = 4)
  128.     drop procedure sp_addsubscription
  129. go
  130. if exists (select * from sysobjects where name = 'sp_addtype' and sysstat & 0xf = 4)
  131.     drop procedure sp_addtype
  132. go
  133. if exists (select * from sysobjects where name = 'sp_addumpdevice' and sysstat & 0xf = 4)
  134.     drop procedure sp_addumpdevice
  135. go
  136. if exists (select * from sysobjects where name = 'sp_adduser' and sysstat & 0xf = 4)
  137.     drop procedure sp_adduser
  138. go
  139. if exists (select * from sysobjects where name = 'sp_articlefilter' and sysstat & 0xf = 4)
  140.     drop procedure sp_articlefilter
  141. go
  142. if exists (select * from sysobjects where name = 'sp_articletextcol' and sysstat & 0xf = 4)
  143.     drop procedure sp_articletextcol
  144. go
  145.  
  146. if exists (select * from sysobjects where name = 'sp_textcolstatus' and sysstat & 0xf = 4)
  147.     drop procedure sp_textcolstatus
  148. go
  149.  
  150. if exists (select * from sysobjects where name = 'sp_articleview' and sysstat & 0xf = 4)
  151.     drop procedure sp_articleview
  152. go
  153. if exists (select * from sysobjects where name = 'sp_bindefault' and sysstat & 0xf = 4)
  154.     drop procedure sp_bindefault
  155. go
  156. if exists (select * from sysobjects where name = 'sp_bindrule' and sysstat & 0xf = 4)
  157.     drop procedure sp_bindrule
  158. go
  159. if exists (select * from sysobjects where name = 'sp_certify_removable' and sysstat & 0xf = 4)
  160.     drop procedure sp_certify_removable
  161. go
  162. if exists (select * from sysobjects where name = 'sp_changearticle' and sysstat & 0xf = 4)
  163.     drop procedure sp_changearticle
  164. go
  165. if exists (select * from sysobjects where name = 'sp_changedbowner' and sysstat & 0xf = 4)
  166.     drop procedure sp_changedbowner
  167. go
  168. if exists (select * from sysobjects where name = 'sp_changegroup' and sysstat & 0xf = 4)
  169.     drop procedure sp_changegroup
  170. go
  171. if exists (select * from sysobjects where name = 'sp_changepublication' and sysstat & 0xf = 4)
  172.     drop procedure sp_changepublication
  173. go
  174. if exists (select * from sysobjects where name = 'sp_changesubscriber' and sysstat & 0xf = 4)
  175.     drop procedure sp_changesubscriber
  176. go
  177. if exists (select * from sysobjects where name = 'sp_changesubscription' and sysstat & 0xf = 4)
  178.     drop procedure sp_changesubscription
  179. go
  180. if exists (select * from sysobjects where name = 'sp_hcchangesubstatus1' and sysstat & 0xf = 4)
  181.     drop procedure sp_hcchangesubstatus1
  182. go
  183. if exists (select * from sysobjects where name = 'sp_hcchangesubstatus2' and sysstat & 0xf = 4)
  184.     drop procedure sp_hcchangesubstatus2
  185. go
  186. if exists (select * from sysobjects where name = 'sp_changesubstatus' and sysstat & 0xf = 4)
  187.     drop procedure sp_changesubstatus
  188. go
  189. if exists (select * from sysobjects where name = 'sp_checknames' and sysstat & 0xf = 4)
  190.     drop procedure sp_checknames
  191. go
  192. if exists (select * from sysobjects where name = 'sp_check_objects' and sysstat & 0xf = 4)
  193.     drop procedure sp_check_objects
  194. go
  195. if exists (select * from sysobjects where name = 'sp_check_removable' and sysstat & 0xf = 4)
  196.     drop procedure sp_check_removable
  197. go
  198. if exists (select * from sysobjects where name = 'sp_chklangparam' and sysstat & 0xf = 4)
  199.     drop procedure sp_chklangparam
  200. go
  201. if exists (select * from sysobjects where name = 'sp_commit_xact' and sysstat & 0xf = 4)
  202.     drop procedure sp_commit_xact
  203. go
  204. if exists (select * from sysobjects where name = 'sp_commonkey' and sysstat & 0xf = 4)
  205.     drop procedure sp_commonkey
  206. go
  207. if exists (select * from sysobjects where name = 'sp_configure' and sysstat & 0xf = 4)
  208.     drop procedure sp_configure
  209. go
  210. if exists (select * from sysobjects where name = 'sp_create_removable' and sysstat & 0xf = 4)
  211.     drop procedure sp_create_removable
  212. go
  213. if exists (select * from sysobjects where name = 'sp_create_distribution_tables' and sysstat & 0xf = 4)
  214.     drop procedure sp_create_distribution_tables
  215. go
  216. dump tran master with no_log
  217. go
  218. if exists (select * from sysobjects where name = 'sp_data_init' and sysstat & 0xf = 4)
  219.     drop procedure sp_data_init
  220. go
  221. if exists (select * from sysobjects where name = 'sp_db_upgrade' and sysstat & 0xf = 4)
  222.     drop procedure sp_db_upgrade
  223. go
  224. if exists (select * from sysobjects where name = 'sp_db_upgrade1' and sysstat & 0xf = 4)
  225.     drop procedure sp_db_upgrade1
  226. go
  227. if exists (select * from sysobjects where name = 'sp_db_upgrade2' and sysstat & 0xf = 4)
  228.     drop procedure sp_db_upgrade2
  229. go
  230. if exists (select * from sysobjects where name = 'sp_coalesce_fragments' and sysstat & 0xf = 4)
  231.     drop procedure sp_coalesce_fragments
  232. go
  233. if exists (select * from sysobjects where name = 'sp_dbinstall' and sysstat & 0xf = 4)
  234.     drop procedure sp_dbinstall
  235. go
  236. if exists (select * from sysobjects where name = 'sp_dboption' and sysstat & 0xf = 4)
  237.     drop procedure sp_dboption
  238. go
  239. if exists (select * from sysobjects where name = 'sp_dbremove' and sysstat & 0xf = 4)
  240.     drop procedure sp_dbremove
  241. go
  242. if exists (select * from sysobjects where name = 'sp_defaultdb' and sysstat & 0xf = 4)
  243.     drop procedure sp_defaultdb
  244. go
  245. if exists (select * from sysobjects where name = 'sp_defaultlanguage' and sysstat & 0xf = 4)
  246.     drop procedure sp_defaultlanguage
  247. go
  248. if exists (select * from sysobjects where name = 'sp_depends' and sysstat & 0xf = 4)
  249.     drop procedure sp_depends
  250. go
  251. if exists (select * from sysobjects where name = 'sp_devcreate' and sysstat & 0xf = 4)
  252.     drop procedure sp_devcreate
  253. go
  254. if exists (select * from sysobjects where name = 'sp_devoption' and sysstat & 0xf = 4)
  255.     drop procedure sp_devoption
  256. go
  257. if exists (select * from sysobjects where name = 'sp_diskdefault' and sysstat & 0xf = 4)
  258.     drop procedure sp_diskdefault
  259. go
  260. if exists (select * from sysobjects where name = 'sp_distcounters' and sysstat & 0xf = 4)
  261.     drop procedure sp_distcounters
  262. go
  263. if exists (select * from sysobjects where name = 'sp_dropalias' and sysstat & 0xf = 4)
  264.     drop procedure sp_dropalias
  265. go
  266. if exists (select * from sysobjects where name = 'sp_droparticle' and sysstat & 0xf = 4)
  267.     drop procedure sp_droparticle
  268. go
  269. if exists (select * from sysobjects where name = 'sp_dropdevice' and sysstat & 0xf = 4)
  270.     drop procedure sp_dropdevice
  271. go
  272. if exists (select * from sysobjects where name = 'sp_dropdumpdevice' and sysstat & 0xf = 4)
  273.     drop procedure sp_dropdumpdevice
  274. go
  275. if exists (select * from sysobjects where name = 'sp_dropextendedproc' and sysstat & 0xf = 4)
  276.     drop procedure sp_dropextendedproc
  277. go
  278. if exists (select * from sysobjects where name = 'sp_dropgroup' and sysstat & 0xf = 4)
  279.     drop procedure sp_dropgroup
  280. go
  281. if exists (select * from sysobjects where name = 'sp_dropkey' and sysstat & 0xf = 4)
  282.     drop procedure sp_dropkey
  283. go
  284. if exists (select * from sysobjects where name = 'sp_droplanguage' and sysstat & 0xf = 4)
  285.     drop procedure sp_droplanguage
  286. go
  287. if exists (select * from sysobjects where name = 'sp_droplogin' and sysstat & 0xf = 4)
  288.     drop procedure sp_droplogin
  289. go
  290. if exists (select * from sysobjects where name = 'sp_dropmessage' and sysstat & 0xf = 4)
  291.     drop procedure sp_dropmessage
  292. go
  293. if exists (select * from sysobjects where name = 'sp_droppublication' and sysstat & 0xf = 4)
  294.     drop procedure sp_droppublication
  295. go
  296. if exists (select * from sysobjects where name = 'sp_droppublisher' and sysstat & 0xf = 4)
  297.     drop procedure sp_droppublisher
  298. go
  299. if exists (select * from sysobjects where name = 'sp_dropremotelogin' and sysstat & 0xf = 4)
  300.     drop procedure sp_dropremotelogin
  301. go
  302. if exists (select * from sysobjects where name = 'sp_dropsegment' and sysstat & 0xf = 4)
  303.     drop procedure sp_dropsegment
  304. go
  305. if exists (select * from sysobjects where name = 'sp_dropserver' and sysstat & 0xf = 4)
  306.     drop procedure sp_dropserver
  307. go
  308. if exists (select * from sysobjects where name = 'sp_dropsubscriber' and sysstat & 0xf = 4)
  309.     drop procedure sp_dropsubscriber
  310. go
  311. if exists (select * from sysobjects where name = 'sp_dropsubscription' and sysstat & 0xf = 4)
  312.     drop procedure sp_dropsubscription
  313. go
  314. if exists (select * from sysobjects where name = 'sp_droptype' and sysstat & 0xf = 4)
  315.     drop procedure sp_droptype
  316. go
  317. if exists (select * from sysobjects where name = 'sp_dropuser' and sysstat & 0xf = 4)
  318.     drop procedure sp_dropuser
  319. go
  320. if exists (select * from sysobjects where name = 'sp_dsninfo' and sysstat & 0xf = 4)
  321.     drop procedure sp_dsninfo
  322. go
  323. if exists (select * from sysobjects where name = 'sp_enumfullsubscribers' and sysstat & 0xf = 4)
  324.     drop procedure sp_enumfullsubscribers
  325. go
  326. if exists (select * from sysobjects where name = 'sp_enumdsn' and sysstat & 0xf = 4)
  327.     drop procedure sp_enumdsn
  328. go
  329. if exists (select * from sysobjects where name = 'sp_extendsegment' and sysstat & 0xf = 4)
  330.     drop procedure sp_extendsegment
  331. go
  332. if exists (select * from sysobjects where name = 'sp_fixindex' and sysstat & 0xf = 4)
  333.     drop procedure sp_fixindex
  334. go
  335. if exists (select * from sysobjects where name = 'sp_foreignkey' and sysstat & 0xf = 4)
  336.     drop procedure sp_foreignkey
  337. go
  338. if exists (select * from sysobjects where name = 'sp_help' and sysstat & 0xf = 4)
  339.     drop procedure sp_help
  340. go
  341. if exists (select * from sysobjects where name = 'sp_helparticle' and sysstat & 0xf = 4)
  342.     drop procedure sp_helparticle
  343. go
  344. if exists (select * from sysobjects where name = 'sp_helparticlecolumns' and sysstat & 0xf = 4)
  345.     drop procedure sp_helparticlecolumns
  346. go
  347. if exists (select * from sysobjects where name = 'sp_cnst_csr' and sysstat & 0xf = 4)
  348.     drop procedure sp_cnst_csr
  349. go
  350. if exists (select * from sysobjects where name = 'sp_helpconstraint' and sysstat & 0xf = 4)
  351.     drop procedure sp_helpconstraint
  352. go
  353. if exists (select * from sysobjects where name = 'sp_helpdb' and sysstat & 0xf = 4)
  354.     drop procedure sp_helpdb
  355. go
  356. if exists (select * from sysobjects where name = 'sp_helpdevice' and sysstat & 0xf = 4)
  357.     drop procedure sp_helpdevice
  358. go
  359. if exists (select * from sysobjects where name = 'sp_helpdistributor' and sysstat & 0xf = 4)
  360.     drop procedure sp_helpdistributor
  361. go
  362. if exists (select * from sysobjects where name = 'sp_helpextendedproc' and sysstat & 0xf = 4)
  363.     drop procedure sp_helpextendedproc
  364. go
  365. if exists (select * from sysobjects where name = 'sp_helpgroup' and sysstat & 0xf = 4)
  366.     drop procedure sp_helpgroup
  367. go
  368. if exists (select * from sysobjects where name = 'sp_helpindex' and sysstat & 0xf = 4)
  369.     drop procedure sp_helpindex
  370. go
  371. if exists (select * from sysobjects where name = 'sp_helpjoins' and sysstat & 0xf = 4)
  372.     drop procedure sp_helpjoins
  373. go
  374. dump tran master with no_log
  375. go
  376. if exists (select * from sysobjects where name = 'sp_helpkey' and sysstat & 0xf = 4)
  377.     drop procedure sp_helpkey
  378. go
  379. if exists (select * from sysobjects where name = 'sp_helplanguage' and sysstat & 0xf = 4)
  380.     drop procedure sp_helplanguage
  381. go
  382. if exists (select * from sysobjects where name = 'sp_helplog' and sysstat & 0xf = 4)
  383.     drop procedure sp_helplog
  384. go
  385. if exists (select * from sysobjects where name = 'sp_helpremotelogin' and sysstat & 0xf = 4)
  386.     drop procedure sp_helpremotelogin
  387. go
  388. if exists (select * from sysobjects where name = 'sp_helprotect' and sysstat & 0xf = 4)
  389.     drop procedure sp_helprotect
  390. go
  391. if exists (select * from sysobjects where name = 'sp_helppublication' and sysstat & 0xf = 4)
  392.     drop procedure sp_helppublication
  393. go
  394. if exists (select * from sysobjects where name = 'sp_helppublicationsync' and sysstat & 0xf = 4)
  395.     drop procedure sp_helppublicationsync
  396. go
  397. if exists (select * from sysobjects where name = 'sp_helppublisheddb' and sysstat & 0xf = 4)
  398.     drop procedure sp_helppublisheddb
  399. go
  400. if exists (select * from sysobjects where name = 'sp_helpreplicationdb' and sysstat & 0xf = 4)
  401.     drop procedure sp_helpreplicationdb
  402. go
  403. if exists (select * from sysobjects where name = 'sp_helpsegment' and sysstat & 0xf = 4)
  404.     drop procedure sp_helpsegment
  405. go
  406. if exists (select * from sysobjects where name = 'sp_helpserver' and sysstat & 0xf = 4)
  407.     drop procedure sp_helpserver
  408. go
  409. if exists (select * from sysobjects where name = 'sp_helpstartup' and sysstat & 0xf = 4)
  410.     drop procedure sp_helpstartup
  411. go
  412. if exists (select * from sysobjects where name = 'sp_helpsort' and sysstat & 0xf = 4)
  413.     drop procedure sp_helpsort
  414. go
  415. if exists (select * from sysobjects where name = 'sp_helpsubscriberinfo' and sysstat & 0xf = 4)
  416.     drop procedure sp_helpsubscriberinfo
  417. go
  418. if exists (select * from sysobjects where name = 'sp_helpsubscription' and sysstat & 0xf = 4)
  419.     drop procedure sp_helpsubscription
  420. go
  421. if exists (select * from sysobjects where name = 'sp_helptext' and sysstat & 0xf = 4)
  422.     drop procedure sp_helptext
  423. go
  424. if exists (select * from sysobjects where name = 'sp_helpuser' and sysstat & 0xf = 4)
  425.     drop procedure sp_helpuser
  426. go
  427. if exists (select * from sysobjects where name = 'sp_lock' and sysstat & 0xf = 4)
  428.     drop procedure sp_lock
  429. go
  430. if exists (select * from sysobjects where name = 'sp_lockinfo' and sysstat & 0xf = 4)
  431.     drop procedure sp_lockinfo
  432. go
  433. if exists (select * from sysobjects where name = 'sp_logdevice' and sysstat & 0xf = 4)
  434.     drop procedure sp_logdevice
  435. go
  436. if exists (select * from sysobjects where name = 'sp_lookup' and sysstat & 0xf = 4)
  437.     drop procedure sp_lookup
  438. go
  439. if exists (select * from sysobjects where name = 'sp_makestartup' and sysstat & 0xf = 4)
  440.     drop procedure sp_makestartup
  441. go
  442. if exists (select * from sysobjects where name = 'sp_markreport' and sysstat & 0xf = 4)
  443.     drop procedure sp_markreport
  444. go
  445. if exists (select * from sysobjects where name = 'sp_monitor' and sysstat & 0xf = 4)
  446.     drop procedure sp_monitor
  447. go
  448. if exists (select * from sysobjects where name = 'sp_MSdbuserprofile' and sysstat & 0xf = 4)
  449.     drop procedure sp_MSdbuserprofile
  450. go
  451. if exists (select * from sysobjects where name = 'sp_MShelpindex' and sysstat & 0xf = 4)
  452.     drop procedure sp_MShelpindex
  453. go
  454.  
  455. if exists (select * from sysobjects where name = 'sp_MSobjectprivs' and sysstat & 0xf = 4)
  456.     drop procedure sp_MShelpindex
  457. go
  458.  
  459. if exists (select * from sysobjects where name = 'sp_namecrack' and sysstat & 0xf = 4)
  460.     drop procedure sp_namecrack
  461. go
  462. if exists (select * from sysobjects where name = 'sp_objcheck' and sysstat & 0xf = 4)
  463.     drop procedure sp_objcheck
  464. go
  465. if exists (select * from sysobjects where name = 'sp_objectsegment' and sysstat & 0xf = 4)
  466.     drop procedure sp_objectsegment
  467. go
  468. if exists (select * from sysobjects where name = 'sp_password' and sysstat & 0xf = 4)
  469.     drop procedure sp_password
  470. go
  471. if exists (select * from sysobjects where name = 'sp_placeobject' and sysstat & 0xf = 4)
  472.     drop procedure sp_placeobject
  473. go
  474. if exists (select * from sysobjects where name = 'sp_primarykey' and sysstat & 0xf = 4)
  475.     drop procedure sp_primarykey
  476. go
  477. if exists (select * from sysobjects where name = 'sp_probe_xact' and sysstat & 0xf = 4)
  478.     drop procedure sp_probe_xact
  479. go
  480. if exists (select * from sysobjects where name = 'sp_processinfo' and sysstat & 0xf = 4)
  481.     drop procedure sp_processinfo
  482. go
  483. if exists (select * from sysobjects where name = 'sp_processmail' and sysstat & 0xf = 4)
  484.     drop procedure sp_processmail
  485. go
  486. if exists (select * from sysobjects where name = 'sp_publishdb' and sysstat & 0xf = 4)
  487.     drop procedure sp_publishdb
  488. go
  489. if exists (select * from sysobjects where name = 'sp_recompile' and sysstat & 0xf = 4)
  490.     drop procedure sp_recompile
  491. go
  492. if exists (select * from sysobjects where name = 'sp_remoteoption' and sysstat & 0xf = 4)
  493.     drop procedure sp_remoteoption
  494. go
  495. if exists (select * from sysobjects where name = 'sp_remove_xact' and sysstat & 0xf = 4)
  496.     drop procedure sp_remove_xact
  497. go
  498. if exists (select * from sysobjects where name = 'sp_rename' and sysstat & 0xf = 4)
  499.     drop procedure sp_rename
  500. go
  501. if exists (select * from sysobjects where name = 'sp_renamedb' and sysstat & 0xf = 4)
  502.     drop procedure sp_renamedb
  503. go
  504. if exists (select * from sysobjects where name = 'sp_replica' and sysstat & 0xf = 4)
  505.     drop procedure sp_replica
  506. go
  507. if exists (select * from sysobjects where name = 'sp_replsync' and sysstat & 0xf = 4)
  508.     drop procedure sp_replsync
  509. go
  510. if exists (select * from sysobjects where name = 'sp_replcmds' and sysstat & 0xf = 4)
  511.     drop procedure sp_replcmds
  512. go
  513. if exists (select * from sysobjects where name = 'sp_replcounters' and sysstat & 0xf = 4)
  514.     drop procedure sp_replcounters
  515. go
  516. if exists (select * from sysobjects where name = 'sp_repldone' and sysstat & 0xf = 4)
  517.     drop procedure sp_repldone
  518. go
  519. if exists (select * from sysobjects where name = 'sp_replflush' and sysstat & 0xf = 4)
  520.     drop procedure sp_replflush
  521. go
  522. if exists (select * from sysobjects where name = 'sp_replstatus' and sysstat & 0xf = 4)
  523.     drop procedure sp_replstatus
  524. go
  525. if exists (select * from sysobjects where name = 'sp_repltrans' and sysstat & 0xf = 4)
  526.     drop procedure sp_repltrans
  527. go
  528. if exists (select * from sysobjects where name = 'sp_schedulersignal' and sysstat & 0xf = 4)
  529.     drop procedure sp_schedulersignal
  530. go
  531. if exists (select * from sysobjects where name = 'sp_schema_modify' and sysstat & 0xf = 4)
  532.     drop procedure sp_schema_modify
  533. go
  534. if exists (select * from sysobjects where name = 'sp_scan_xact' and sysstat & 0xf = 4)
  535.     drop procedure sp_scan_xact
  536. go
  537. if exists (select * from sysobjects where name = 'sp_setnetname' and sysstat & 0xf = 4)
  538.     drop procedure sp_setnetname
  539. go
  540. if exists (select * from sysobjects where name = 'sp_serveroption' and sysstat & 0xf = 4)
  541.     drop procedure sp_serveroption
  542. go
  543. if exists (select * from sysobjects where name = 'sp_setlangalias' and sysstat & 0xf = 4)
  544.     drop procedure sp_setlangalias
  545. go
  546. if exists (select * from sysobjects where name = 'sp_spaceused' and sysstat & 0xf = 4)
  547.     drop procedure sp_spaceused
  548. go
  549. if exists (select * from sysobjects where name = 'sp_sqlexec' and sysstat & 0xf = 4)
  550.     drop procedure sp_sqlexec
  551. go
  552. if exists (select * from sysobjects where name = 'sp_start_xact' and sysstat & 0xf = 4)
  553.     drop procedure sp_start_xact
  554. go
  555. if exists (select * from sysobjects where name = 'sp_stat_xact' and sysstat & 0xf = 4)
  556.     drop procedure sp_stat_xact
  557. go
  558. if exists (select * from sysobjects where name = 'sp_subscribe' and sysstat & 0xf = 4)
  559.     drop procedure sp_subscribe
  560. go
  561. if exists (select * from sysobjects where name = 'sp_unbindefault' and sysstat & 0xf = 4)
  562.     drop procedure sp_unbindefault
  563. go
  564. if exists (select * from sysobjects where name = 'sp_unbindrule' and sysstat & 0xf = 4)
  565.     drop procedure sp_unbindrule
  566. go
  567. if exists (select * from sysobjects where name = 'sp_unmakestartup' and sysstat & 0xf = 4)
  568.     drop procedure sp_unmakestartup
  569. go
  570. if exists (select * from sysobjects where name = 'sp_unsubscribe' and sysstat & 0xf = 4)
  571.     drop procedure sp_unsubscribe
  572. go
  573. if exists (select * from sysobjects where name = 'sp_validaltlang' and sysstat & 0xf = 4)
  574.     drop procedure sp_validaltlang
  575. go
  576. if exists (select * from sysobjects where name = 'sp_validlang' and sysstat & 0xf = 4)
  577.     drop procedure sp_validlang
  578. go
  579. if exists (select * from sysobjects where name = 'sp_validname' and sysstat & 0xf = 4)
  580.     drop procedure sp_validname
  581. go
  582. if exists (select * from sysobjects where name = 'sp_who' and sysstat & 0xf = 4)
  583.     drop procedure sp_who
  584. go
  585.  
  586. dump tran master with no_log
  587. go
  588.  
  589. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MShelpcolumns')
  590.     drop procedure sp_MShelpcolumns
  591. go
  592. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MShelptype')
  593.     drop procedure sp_MShelptype
  594. go
  595. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSdependencies')
  596.     drop procedure sp_MSdependencies
  597. go
  598. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MStablespace')
  599.     drop procedure sp_MStablespace
  600. go
  601. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSindexspace')
  602.     drop procedure sp_MSindexspace
  603. go
  604. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSuniquename')
  605.     drop procedure sp_MSuniquename
  606. go
  607. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSkilldb')
  608.     drop procedure sp_MSkilldb
  609. go
  610.  
  611. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSgetalertinfo')
  612.     drop procedure sp_MSgetalertinfo
  613. go
  614. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSsetalertinfo')
  615.     drop procedure sp_MSsetalertinfo
  616. go
  617. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSgetexecinfo')
  618.     drop procedure sp_MSgetexecinfo
  619. go
  620. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSsetexecinfo')
  621.     drop procedure sp_MSsetexecinfo
  622. go
  623. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MStablekeys')
  624.     drop procedure sp_MStablekeys
  625. go
  626. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MStablechecks')
  627.     drop procedure sp_MStablechecks
  628. go
  629. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MStablerefs')
  630.     drop procedure sp_MStablerefs
  631. go
  632. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSsettopology')
  633.     drop procedure sp_MSsettopology
  634. go
  635. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSfilterclause')
  636.     drop procedure sp_MSfilterclause
  637. go
  638. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSmatchkey')
  639.     drop procedure sp_MSmatchkey
  640. go
  641. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSsubscriptions')
  642.     drop procedure sp_MSsubscriptions
  643. go
  644. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSforeachdb')
  645.     drop procedure sp_MSforeachdb
  646. go
  647. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSforeachtable')
  648.     drop procedure sp_MSforeachtable
  649. go
  650. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSforeach_worker')
  651.     drop procedure sp_MSforeach_worker
  652. go
  653. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSloginmappings')
  654.     drop procedure sp_MSloginmappings
  655. go
  656.  
  657. if exists (select * from sysobjects where sysstat & 0x0f = 4 and name = 'sp_MSSQLOLE_version')
  658.     drop procedure sp_MSSQLOLE_version
  659. go
  660.  
  661.  
  662. /***********  Do not lose data....
  663. print ''
  664. print 'Dropping tables'
  665. print ''
  666. --go
  667.  
  668.  
  669. --if exists (select * from sysobjects where name = 'helpsql' and sysstat & 0xf = 3)
  670. -- !    drop table helpsql
  671.  
  672.  
  673. if exists (select * from sysobjects where name = 'MSdatatype_info' and sysstat & 0xf = 3)
  674.     drop table MSdatatype_info
  675.  
  676. if exists (select * from sysobjects where name = 'MSdatatype_info_ext' and sysstat & 0xf = 3)
  677.     drop table MSdatatype_info_ext
  678.  
  679. if exists (select * from sysobjects where name = 'MSobjects' and sysstat & 0xf = 3)
  680.     drop table MSobjects
  681.  
  682. if exists (select * from sysobjects where name = 'MSserver_info' and sysstat & 0xf = 3)
  683.     drop table MSserver_info
  684.  
  685. if exists (select * from sysobjects where name = 'MStable_types' and sysstat & 0xf = 3)
  686.     drop table MStable_types
  687.  
  688. if exists (select * from sysobjects where name = 'spt_committab' and sysstat & 0xf = 3)
  689.     drop table spt_committab
  690.  
  691. if exists (select * from sysobjects where name = 'spt_datatype_info' and sysstat & 0xf = 3)
  692.     drop table spt_datatype_info
  693.  
  694. if exists (select * from sysobjects where name = 'spt_datatype_info_ext' and sysstat & 0xf = 3)
  695.     drop table spt_datatype_info_ext
  696.  
  697. if exists (select * from sysobjects where name = 'spt_monitor' and sysstat & 0xf = 3)
  698.     drop table spt_monitor
  699.  
  700. if exists (select * from sysobjects where name = 'spt_server_info' and sysstat & 0xf = 3)
  701.     drop table spt_server_info
  702.  
  703. if exists (select * from sysobjects where name = 'spt_table_types' and sysstat & 0xf = 3)
  704.     drop table spt_table_types
  705.  
  706. if exists (select * from sysobjects where name = 'spt_values' and sysstat & 0xf = 3)
  707.     drop table spt_values
  708. *************/
  709.  
  710. go
  711. dump tran master with no_log
  712. go
  713.  
  714. print 'Done.'
  715. go
  716. -- - ----
  717.