forked from SSASQueryAnalyzer/SSASQueryAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SSASQueryAnalyzerDatabaseUninstallBody.sql
110 lines (83 loc) · 4.52 KB
/
SSASQueryAnalyzerDatabaseUninstallBody.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
USE [ASQA]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_CommonAggregationsRead]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_CommonAggregationsRead];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_CommonCachesRead]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_CommonCachesRead];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_CommonEnginePerformance]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_CommonEnginePerformance];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_CommonPartitionsRead]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_CommonPartitionsRead];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_Performance]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_Performance];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_Trace]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_Trace];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_ExecutionInfo]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_ExecutionInfo];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_PerformanceTypes]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_PerformanceTypes];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_read_TraceTypes]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_read_TraceTypes];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_BatchID]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_BatchID];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_ConnectionUserName]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_ConnectionUserName];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_CubeName]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_CubeName];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_DatabaseName]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_DatabaseName];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_Execution]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_Execution];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_ExecutionName]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_ExecutionName];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_ExecutionStartTime]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_ExecutionStartTime];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[sp_find_ServerName]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [asqa].[sp_find_ServerName];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('[asqa].[vw_Execution]') AND type IN (N'V'))
DROP VIEW [asqa].[vw_Execution];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[Execution]') AND type IN (N'U'))
DROP TABLE [asqa].[Execution];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[Performance]') AND type IN (N'U'))
DROP TABLE [asqa].[Performance];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[Trace]') AND type IN (N'U'))
DROP TABLE [asqa].[Trace];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[CommonEnginePerformance]') AND type IN (N'U'))
DROP TABLE [asqa].[CommonEnginePerformance];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[CommonCachesRead]') AND type IN (N'U'))
DROP TABLE [asqa].[CommonCachesRead];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[CommonPartitionsRead]') AND type IN (N'U'))
DROP TABLE [asqa].[CommonPartitionsRead];
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[asqa].[CommonAggregationsRead]') AND type IN (N'U'))
DROP TABLE [asqa].[CommonAggregationsRead];
GO
IF EXISTS (SELECT * FROM sys.extended_properties WHERE [class] = 0 AND [name] = N'ASQA_DatabaseVersion')
EXEC sys.sp_dropextendedproperty @name=N'ASQA_DatabaseVersion'
GO
IF EXISTS (SELECT * FROM sys.schemas WHERE name = N'asqa')
DROP SCHEMA [asqa];
GO