home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a061 / 8.img / UNADMIN.SQ@ / UNADMIN.bin
Encoding:
Text File  |  1992-02-26  |  4.5 KB  |  145 lines

  1. /***************************************************************************/
  2. /* This stored procedure drops all the stored procedures and tables
  3.    that the SQL Server Admin tool uses are actually on the server       */
  4. /***************************************************************************/
  5.  
  6. use master
  7. go
  8.  
  9. /* */
  10. /* Drop procedures */
  11. /* */
  12.  
  13. if exists (select * from sysobjects where name = 'sp_MSdevice_list' and sysstat & 7 = 4)
  14. begin
  15.   drop procedure sp_MSdevice_list
  16. end
  17. if exists (select * from sysobjects where name = 'sp_MSdev_description' and sysstat & 7 = 4)
  18. begin
  19.   drop procedure sp_MSdev_description
  20. end
  21. if exists (select * from sysobjects where name = 'sp_MSdev_databases' and sysstat & 7 = 4)
  22. begin
  23.   drop procedure sp_MSdev_databases
  24. end
  25. if exists (select * from sysobjects where name = 'sp_MSsys_monitor' and sysstat & 7 = 4)
  26. begin
  27.   drop procedure sp_MSsys_monitor
  28. end
  29. if exists (select * from sysobjects where name = 'sp_MSnext_devnumber' and sysstat & 7 = 4)
  30. begin
  31.   drop procedure sp_MSnext_devnumber
  32. end
  33. if exists (select * from sysobjects where name = 'sp_MSdatabase_list' and sysstat & 7 = 4)
  34. begin
  35.   drop procedure sp_MSdatabase_list
  36. end
  37. if exists (select * from sysobjects where name = 'sp_MSdatabase_avail' and sysstat & 7 = 4)
  38. begin
  39.   drop procedure sp_MSdatabase_avail
  40. end
  41. if exists (select * from sysobjects where name = 'sp_MSbackup_now' and sysstat & 7 = 4)
  42. begin
  43.   drop procedure sp_MSbackup_now
  44. end
  45. if exists (select * from sysobjects where name = 'sp_MSuser_list' and sysstat & 7 = 4)
  46. begin
  47.   drop procedure sp_MSuser_list
  48. end
  49. if exists (select * from sysobjects where name = 'sp_MSmonitor' and sysstat & 7 = 4)
  50. begin
  51.   drop procedure sp_MSmonitor
  52. end
  53. if exists (select * from sysobjects where name = 'sp_MSdb_devices' and sysstat & 7 = 4)
  54. begin
  55.   drop procedure sp_MSdb_devices
  56. end
  57. if exists (select * from sysobjects where name = 'sp_MSdb_options' and sysstat & 7 = 4)
  58. begin
  59.   drop procedure sp_MSdb_options
  60. end
  61. if exists (select * from sysobjects where name = 'sp_MSdb_properties' and sysstat & 7 = 4)
  62. begin
  63.   drop procedure sp_MSdb_properties
  64. end
  65. if exists (select * from sysobjects where name = 'sp_MSdb_space' and sysstat & 7 = 4)
  66. begin
  67.   drop procedure sp_MSdb_space
  68. end
  69. if exists (select * from sysobjects where name = 'sp_MSbackup_schedule' and sysstat & 7 = 4)
  70. begin
  71.   drop procedure sp_MSbackup_schedule
  72. end
  73. if exists (select * from sysobjects where name = 'sp_MScmd_permissions' and sysstat & 7 = 4)
  74. begin
  75.   drop procedure sp_MScmd_permissions
  76. end
  77. if exists (select * from sysobjects where name = 'sp_MSuser_cmd_permissions' and sysstat & 7 = 4)
  78. begin
  79.   drop procedure sp_MSuser_cmd_permissions
  80. end
  81. if exists (select * from sysobjects where name = 'sp_MScheck_admin' and sysstat & 7 = 4)
  82. begin
  83.   drop procedure sp_MScheck_admin
  84. end
  85. if exists (select * from sysobjects where name = 'sp_MSdb_options_bits' and sysstat & 7 = 4)
  86. begin
  87.   drop procedure sp_MSdb_options_bits
  88. end
  89.  
  90. /* */
  91. /* these are 4.2 only */
  92. /* */
  93.  
  94. if exists (select * from sysobjects where name = 'sp_MSdev_mirror' and sysstat & 7 = 4)
  95. begin
  96.   drop procedure sp_MSdev_mirror
  97. end
  98. if exists (select * from sysobjects where name = 'sp_MSdb_devices_segments' and sysstat & 7 = 4)
  99. begin
  100.   drop procedure sp_MSdb_devices_segments
  101. end
  102. if exists (select * from sysobjects where name = 'sp_MSsegment_list' and sysstat & 7 = 4)
  103. begin
  104.   drop procedure sp_MSsegment_list
  105. end
  106. if exists (select * from master.dbo.sysobjects where name = 'sp_MSsegment_devices' and sysstat & 7 = 4)
  107. begin
  108.   drop procedure sp_MSsegment_devices
  109. end
  110. if exists (select * from sysobjects where name = 'sp_MSseg_properties' and sysstat & 7 = 4)
  111. begin
  112.   drop procedure sp_MSseg_properties
  113. end
  114. if exists (select * from master.dbo.sysobjects where name = 'sp_MSseg_tables' and sysstat & 7 = 4)
  115. begin
  116.   drop procedure sp_MSseg_tables
  117. end
  118. if exists (select * from sysobjects where name = 'sp_MSthread_list' and sysstat & 7 = 4)
  119. begin
  120.   drop procedure sp_MSthread_list
  121. end
  122.  
  123. /* */
  124. /* Drop the tables */
  125. /* */
  126.  
  127. if exists (select * from sysobjects where name = 'MSscheduled_backups')
  128. begin
  129.   drop table MSscheduled_backups
  130. end
  131. if exists (select * from sysobjects where name = 'MSscheduled_backups_log')
  132. begin
  133.   drop table MSscheduled_backups_log
  134. end
  135. if exists (select * from sysobjects where name = 'MSsystem_monitor')
  136. begin
  137.   drop table MSsystem_monitor
  138. end
  139. if exists (select * from sysobjects where name = 'MSlast_monitor')
  140. begin
  141.   drop table MSlast_monitor
  142. end
  143. go
  144. 
  145.