-
Notifications
You must be signed in to change notification settings - Fork 23
/
dmart_bits_STGSQLMET620.sql
82 lines (68 loc) · 2.43 KB
/
dmart_bits_STGSQLMET620.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
USE PA_DMart
GO
SELECT --SourceServer,
Client_ID, SourceDB, [Status], Beta,
LoadStageDBStartDate, LoadStageDBEndDate,
DATEDIFF(minute,LoadStageDBStartDate, LoadStageDBEndDate) AS StageLoadTime,
LoadReportDBStartDate, LoadReportDBEndDate,
DATEDIFF(minute,LoadReportDBStartDate, LoadReportDBEndDate) AS ReportLoadTime
FROM ClientConnection
--WHERE Beta != '2'
--WHERE SourceDB = 'MembersMortgage'
ORDER BY Beta, 2
--UPDATE ClientConnection
--SET Beta='1'
--SET Status = '0'
--SET LoadStageDBStartDate = GetDate() - 2
--,LoadStageDBEndDate = GetDate() - 2
--,LoadReportDBStartDate = GetDate() - 2
--,LoadReportDBEndDate = GetDate() - 2
--WHERE SourceDB = 'MembersMortgage'
USE PA_DMart
GO
SELECT Client_ID, SourceServer, SourceDB, StageServer, StageDB, ReportServer, ReportDB, Status, Beta
FROM ClientConnection
--WHERE ReportServer = 'PSQLRPT22'
ORDER BY Beta,3 --DESC
USE PA_DMart
GO
SELECT Client_id, SourceServer, SourceDB, Status, Beta, StageServer, StageDB, ReportServer, ReportDB,
LoadStageDBStartDate, LoadStageDBEndDate,
DATEDIFF(minute,LoadStageDBStartDate, LoadStageDBEndDate) AS StageLoadTime,
LoadReportDBStartDate, LoadReportDBEndDate,
DATEDIFF(minute,LoadReportDBStartDate, LoadReportDBEndDate) AS ReportLoadTime
FROM ClientConnection
--WHERE ReportServer = 'PSQLRPT22'
ORDER BY Beta,3
----------------
/*
UPDATE ClientConnection
SET Beta = 2
--WHERE SourceDB IN ('Weyerhaeuser','Patelco32','Numerica','Lockheed32','CUAnswers','Bethpage40','TIB')
WHERE SourceDB IN ('Vandenberg32','SouthCarolina32','McDillAFB')
--DELETE FROM ClientConnection
--WHERE SourceDB IN ('AmericanAirlines','Bellco32','FirstTech','MidwestFinancial','SDCCU32','SecurityServices','Travis40')
--WHERE SourceDB = 'Purdue'
--DELETE FROM ClientConnection
--WHERE Beta = '2'
*/
SELECT * FROM DMartLogging
ORDER BY ErrorDateTime desc
ins_ClientConnection '27', 'STGSQLMET620', 'MetLifeLFC'
--UPDATE ClientConnection
--SET LoadStageDBStartDate = GetDate()
--,LoadStageDBEndDate = GetDate()
--,LoadReportDBStartDate = GetDate()
--,LoadReportDBEndDate = GetDate()
--WHERE Beta = '0'
--------------------------------------------
--UPDATE ClientConnection
--SET LoadStageDBStartDate = GetDate() - 2
--,LoadStageDBEndDate = GetDate() - 2
--,LoadReportDBStartDate = GetDate() - 2
--,LoadReportDBEndDate = GetDate() - 2
--WHERE SourceDB IN ('MissionFed40','Bellco32')
--WHERE Beta = '1'
UPDATE ClientConnection
SET StageServer = 'STGSQLMET620'
, ReportServer = 'STGSQLMET620'