home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************/
- /* This stored procedure drops all the stored procedures and tables
- that the SQL Server Admin tool uses are actually on the server */
- /***************************************************************************/
-
- use master
- go
-
- /* */
- /* Drop procedures */
- /* */
-
- if exists (select * from sysobjects where name = 'sp_MSdevice_list' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdevice_list
- end
- if exists (select * from sysobjects where name = 'sp_MSdev_description' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdev_description
- end
- if exists (select * from sysobjects where name = 'sp_MSdev_databases' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdev_databases
- end
- if exists (select * from sysobjects where name = 'sp_MSsys_monitor' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSsys_monitor
- end
- if exists (select * from sysobjects where name = 'sp_MSnext_devnumber' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSnext_devnumber
- end
- if exists (select * from sysobjects where name = 'sp_MSdatabase_list' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdatabase_list
- end
- if exists (select * from sysobjects where name = 'sp_MSdatabase_avail' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdatabase_avail
- end
- if exists (select * from sysobjects where name = 'sp_MSbackup_now' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSbackup_now
- end
- if exists (select * from sysobjects where name = 'sp_MSuser_list' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSuser_list
- end
- if exists (select * from sysobjects where name = 'sp_MSmonitor' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSmonitor
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_devices' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_devices
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_options' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_options
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_properties' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_properties
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_space' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_space
- end
- if exists (select * from sysobjects where name = 'sp_MSbackup_schedule' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSbackup_schedule
- end
- if exists (select * from sysobjects where name = 'sp_MScmd_permissions' and sysstat & 7 = 4)
- begin
- drop procedure sp_MScmd_permissions
- end
- if exists (select * from sysobjects where name = 'sp_MSuser_cmd_permissions' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSuser_cmd_permissions
- end
- if exists (select * from sysobjects where name = 'sp_MScheck_admin' and sysstat & 7 = 4)
- begin
- drop procedure sp_MScheck_admin
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_options_bits' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_options_bits
- end
-
- /* */
- /* these are 4.2 only */
- /* */
-
- if exists (select * from sysobjects where name = 'sp_MSdev_mirror' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdev_mirror
- end
- if exists (select * from sysobjects where name = 'sp_MSdb_devices_segments' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSdb_devices_segments
- end
- if exists (select * from sysobjects where name = 'sp_MSsegment_list' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSsegment_list
- end
- if exists (select * from master.dbo.sysobjects where name = 'sp_MSsegment_devices' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSsegment_devices
- end
- if exists (select * from sysobjects where name = 'sp_MSseg_properties' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSseg_properties
- end
- if exists (select * from master.dbo.sysobjects where name = 'sp_MSseg_tables' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSseg_tables
- end
- if exists (select * from sysobjects where name = 'sp_MSthread_list' and sysstat & 7 = 4)
- begin
- drop procedure sp_MSthread_list
- end
-
- /* */
- /* Drop the tables */
- /* */
-
- if exists (select * from sysobjects where name = 'MSscheduled_backups')
- begin
- drop table MSscheduled_backups
- end
- if exists (select * from sysobjects where name = 'MSscheduled_backups_log')
- begin
- drop table MSscheduled_backups_log
- end
- if exists (select * from sysobjects where name = 'MSsystem_monitor')
- begin
- drop table MSsystem_monitor
- end
- if exists (select * from sysobjects where name = 'MSlast_monitor')
- begin
- drop table MSlast_monitor
- end
- go