Removal of RockSolid Footprint from a SQL Server Instance

To remove the footprint of RockSolid on a SQL Server instance please ensure RockSolid monitoring is disabled.  

Once disabled please execute the following to clear any residual RockSolid objects.

---------------------------------------------------------------
-- Script to Clear RockSolid Footprint from SQL Server Instance
-- Monitoring via RockSolid must be disabled first else objects
-- may recreate. Use at your own risk. Take backups first.
-- v1.01
-- Copyright RockSolid SQL Pty Ltd
---------------------------------------------------------------

use [master]
go


if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_BackupMaintanence]')
DROP TABLE [dbo].[ROCKSOLID_BackupMaintanence]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_BackupMaintanencePath]')
DROP TABLE [dbo].[ROCKSOLID_BackupMaintanencePath]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_Blocking]')
DROP TABLE [dbo].[ROCKSOLID_Blocking]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_CheckAllocResult]')
DROP TABLE [dbo].[ROCKSOLID_CheckAllocResult]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_CheckTableResult]')
DROP TABLE [dbo].[ROCKSOLID_CheckTableResult]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_DatabaseMaintanenceWindowTask]')
DROP TABLE [dbo].[ROCKSOLID_DatabaseMaintanenceWindowTask]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_IndexFragmentation]')
DROP TABLE [dbo].[ROCKSOLID_IndexFragmentation]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_LastDBCC]')
DROP TABLE [dbo].[ROCKSOLID_LastDBCC]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_LastIndexRebuild]')
DROP TABLE [dbo].[ROCKSOLID_LastIndexRebuild]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_ReIndexRequest]')
DROP TABLE [dbo].[ROCKSOLID_ReIndexRequest]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_ReIndexResult]')
DROP TABLE [dbo].[ROCKSOLID_ReIndexResult]
if exists(SELECT * FROM sysobjects WHERE type='U' AND name='[dbo].[ROCKSOLID_TraceInProgress]')
DROP TABLE [dbo].[ROCKSOLID_TraceInProgress]
go
use [msdb]
if exists(SELECT * FROM sysobjects WHERE type='P' AND name='[dbo].[rrsp_ROCKSOLID_IsJobExecuting]')
DROP PROC [dbo].[rrsp_ROCKSOLID_IsJobExecuting]
GO
declare @job_id uniqueidentifier

declare c cursor fast_forward for
select job_id
from sysjobs
where name like 'ROCKSOLID - %'

open c

fetch next from c into @job_id

WHILE @@FETCH_STATUS=0
BEGIN
exec sp_delete_job @job_id=@job_id
fetch next from c into @job_id
END
CLOSE c
DEALLOCATE c

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.