User guide
10.3.2
Object Removal Script for Watched 2005 and
Above Servers
Object Removal Script for Watched 2005 and above
USEmsdb
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[sp_sentry_mail]')andOBJECTPROPERTY(object_id,N'IsProcedure')=1)
dropprocedure[dbo].[sp_sentry_mail]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[sp_sentry_mail_20]')andOBJECTPROPERTY(object_id,N'IsProcedure')=1)
dropprocedure[dbo].[sp_sentry_mail_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[sp_sentry_dbmail_20]')andOBJECTPROPERTY(object_id,N'IsProcedure')=1)
dropprocedure[dbo].[sp_sentry_dbmail_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[SQLSentryEmails_20]')andOBJECTPROPERTY(object_id,N'IsUserTable')=1)
droptable[dbo].[SQLSentryEmails_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[SQLSentryDBEmails_Attachments_20]')andOBJECTPROPERTY(object_id,
N'IsUserTable')=1)
droptable[dbo].[SQLSentryDBEmails_Attachments_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[SQLSentryDBEmails_20]')andOBJECTPROPERTY(object_id,N'IsUserTable')=
1)
droptable[dbo].[SQLSentryDBEmails_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[spGetBlockInfo_20]')andOBJECTPROPERTY(object_id,N'IsProcedure')=1)
dropprocedure[dbo].[spGetBlockInfo_20]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[spGetBlockInfo_Pre8sp3]')andOBJECTPROPERTY(object_id,N'IsProcedure')=
1)
dropprocedure[dbo].[spGetBlockInfo_Pre8sp3]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[spGetQueryStatsData]')andOBJECTPROPERTY(object_id,N'IsProcedure')=1)
dropprocedure[dbo].[spGetQueryStatsData]
ifexists(select*fromsys.objectswhereobject_id=object_id(N'[dbo].
[spGetProcedureStatsData]')andOBJECTPROPERTY(object_id,N'IsProcedure')
=1)
dropprocedure[dbo].[spGetProcedureStatsData]
GO
BEGINTRANSACTION
DECLARE@JobIDBINARY(16)
SQL Sentry Quick Start 47
©2015 SQL Sentry. All Rights Reserved.