-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
uninstall_dba-multitool.sql
54 lines (45 loc) · 1.43 KB
/
uninstall_dba-multitool.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
SET NOCOUNT ON;
GO
/* Drop sp_doc */
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_doc]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_doc];
END
GO
/* Drop sp_sizeoptimiser */
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_sizeoptimiser]'))
BEGIN;
DROP PROCEDURE [dbo].[sp_sizeoptimiser];
END
IF EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'SizeOptimiserTableType' AND ss.name = N'dbo')
BEGIN;
DROP TYPE [dbo].[SizeOptimiserTableType];
END
GO
/* Drop sp_estindex */
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_estindex]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_estindex];
END
GO
/* Drop sp_helpme */
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_helpme]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_helpme];
END
GO
/* Drop sp_help_revlogin & sp_hexadecimal */
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_help_revlogin]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_help_revlogin];
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_hexadecimal]') AND [type] IN (N'P', N'PC'))
BEGIN;
DROP PROCEDURE [dbo].[sp_hexadecimal];
END
GOs