home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / alpha / unadmin.sql < prev    next >
Encoding:
Text File  |  1995-04-21  |  5.5 KB  |  201 lines

  1. /***************************************************************************/
  2. /* UNADMIN.SQL - Uninstall SQL Server SQL Administrator Stored Procedures  */
  3. /***************************************************************************/
  4. /* This stored procedure drops all stored procedures and tables            */
  5. /* for the SQL Server Admin tool.                                          */
  6. /***************************************************************************/
  7. /* latest revision - 3/16/93                                               */
  8. /* Copyright (C) 1993 - Microsoft Corporation                              */
  9. /***************************************************************************/
  10. print ''
  11. print 'un-installing SQL Server SQL Administrator Scripts'
  12. go
  13.  
  14.  
  15. use master
  16. go
  17.  
  18. /* */
  19. /* Drop procedures */
  20. /* */
  21.  
  22. if exists (select * from sysobjects where name = 'sp_MSdevice_list' and sysstat & 7 = 4)
  23. begin
  24.   drop procedure sp_MSdevice_list
  25. end
  26.  
  27. if exists (select * from sysobjects where name = 'sp_MSdev_description' and sysstat & 7 = 4)
  28. begin
  29.   drop procedure sp_MSdev_description
  30. end
  31.  
  32. if exists (select * from sysobjects where name = 'sp_MSdev_databases' and sysstat & 7 = 4)
  33. begin
  34.   drop procedure sp_MSdev_databases
  35. end
  36.  
  37. if exists (select * from sysobjects where name = 'sp_MSsys_monitor' and sysstat & 7 = 4)
  38. begin
  39.   drop procedure sp_MSsys_monitor
  40. end
  41.  
  42. if exists (select * from sysobjects where name = 'sp_MSnext_devnumber' and sysstat & 7 = 4)
  43. begin
  44.   drop procedure sp_MSnext_devnumber
  45. end
  46.  
  47. if exists (select * from sysobjects where name = 'sp_MSdatabase_list' and sysstat & 7 = 4)
  48. begin
  49.   drop procedure sp_MSdatabase_list
  50. end
  51.  
  52. if exists (select * from sysobjects where name = 'sp_MSdatabase_avail' and sysstat & 7 = 4)
  53. begin
  54.   drop procedure sp_MSdatabase_avail
  55. end
  56.  
  57. if exists (select * from sysobjects where name = 'sp_MSbackup_now' and sysstat & 7 = 4)
  58. begin
  59.   drop procedure sp_MSbackup_now
  60. end
  61.  
  62. if exists (select * from sysobjects where name = 'sp_MSuser_list' and sysstat & 7 = 4)
  63. begin
  64.   drop procedure sp_MSuser_list
  65. end
  66.  
  67. if exists (select * from sysobjects where name = 'sp_MSmonitor' and sysstat & 7 = 4)
  68. begin
  69.   drop procedure sp_MSmonitor
  70. end
  71.  
  72. if exists (select * from sysobjects where name = 'sp_MSdb_devices' and sysstat & 7 = 4)
  73. begin
  74.   drop procedure sp_MSdb_devices
  75. end
  76.  
  77. if exists (select * from sysobjects where name = 'sp_MSdb_options' and sysstat & 7 = 4)
  78. begin
  79.   drop procedure sp_MSdb_options
  80. end
  81.  
  82. if exists (select * from sysobjects where name = 'sp_MSdb_properties' and sysstat & 7 = 4)
  83. begin
  84.   drop procedure sp_MSdb_properties
  85. end
  86.  
  87. if exists (select * from sysobjects where name = 'sp_MSdb_space' and sysstat & 7 = 4)
  88. begin
  89.   drop procedure sp_MSdb_space
  90. end
  91.  
  92. if exists (select * from sysobjects where name = 'sp_MSbackup_schedule' and sysstat & 7 = 4)
  93. begin
  94.   drop procedure sp_MSbackup_schedule
  95. end
  96.  
  97. if exists (select * from sysobjects where name = 'sp_MScmd_permissions' and sysstat & 7 = 4)
  98. begin
  99.   drop procedure sp_MScmd_permissions
  100. end
  101.  
  102. if exists (select * from sysobjects where name = 'sp_MSuser_cmd_permissions' and sysstat & 7 = 4)
  103. begin
  104.   drop procedure sp_MSuser_cmd_permissions
  105. end
  106.  
  107. if exists (select * from sysobjects where name = 'sp_MScheck_admin' and sysstat & 7 = 4)
  108. begin
  109.   drop procedure sp_MScheck_admin
  110. end
  111.  
  112. if exists (select * from sysobjects where name = 'sp_MSdb_options_bits' and sysstat & 7 = 4)
  113. begin
  114.   drop procedure sp_MSdb_options_bits
  115. end
  116.  
  117. if exists (select * from sysobjects where name = 'sp_MSAdmin_version' and sysstat & 7 = 4)
  118. begin
  119.   drop procedure sp_MSAdmin_version
  120. end
  121. go
  122.  
  123. print ''
  124. go
  125. /* */
  126. /* these are 4.2 only */
  127. /* */
  128.  
  129. if exists (select * from sysobjects where name = 'sp_MSdev_mirror' and sysstat & 7 = 4)
  130. begin
  131.   drop procedure sp_MSdev_mirror
  132. end
  133.  
  134. if exists (select * from sysobjects where name = 'sp_MSdb_devices_segments' and sysstat & 7 = 4)
  135. begin
  136.   drop procedure sp_MSdb_devices_segments
  137. end
  138.  
  139. if exists (select * from sysobjects where name = 'sp_MSsegment_list' and sysstat & 7 = 4)
  140. begin
  141.   drop procedure sp_MSsegment_list
  142. end
  143.  
  144. if exists (select * from master.dbo.sysobjects where name = 'sp_MSsegment_devices' and sysstat & 7 = 4)
  145. begin
  146.   drop procedure sp_MSsegment_devices
  147. end
  148.  
  149. if exists (select * from sysobjects where name = 'sp_MSseg_properties' and sysstat & 7 = 4)
  150. begin
  151.   drop procedure sp_MSseg_properties
  152. end
  153.  
  154. if exists (select * from master.dbo.sysobjects where name = 'sp_MSseg_tables' and sysstat & 7 = 4)
  155. begin
  156.   drop procedure sp_MSseg_tables
  157. end
  158.  
  159. if exists (select * from sysobjects where name = 'sp_MSthread_list' and sysstat & 7 = 4)
  160. begin
  161.   drop procedure sp_MSthread_list
  162. end
  163.  
  164. if exists (select * from sysobjects where name = 'sp_MShelpdb' and sysstat & 7 = 4)
  165. begin
  166.   drop procedure sp_MShelpdb
  167. end
  168. if exists (select * from sysobjects where name = 'sp_MShelpremotelogin' and sysstat & 7 = 4)
  169. begin
  170.   drop procedure sp_MShelpremotelogin
  171. end
  172. if exists (select * from sysobjects where name = 'sp_MShelpserver' and sysstat & 7 = 4)
  173. begin
  174.   drop procedure sp_MShelpserver
  175. end
  176.  
  177. if exists (select * from sysobjects where name = 'sp_MSlogdevice' and sysstat & 7 = 4)
  178. begin
  179.   drop procedure sp_MSlogdevice
  180. end
  181.  
  182.  
  183. /* */
  184. /* Drop the tables */
  185. /* */
  186. print ''
  187. go
  188.  
  189. if exists (select * from sysobjects where name = 'MSsystem_monitor')
  190. begin
  191.   drop table MSsystem_monitor
  192. end
  193.  
  194. if exists (select * from sysobjects where name = 'MSlast_monitor')
  195. begin
  196.   drop table MSlast_monitor
  197. end
  198.  
  199. go
  200. 
  201.