-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGenEngineAttribWatchWindow.sql
More file actions
35 lines (30 loc) · 1.05 KB
/
GenEngineAttribWatchWindow.sql
File metadata and controls
35 lines (30 loc) · 1.05 KB
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
--Copy and Paste the Results of this script into a text file
--and load that file into object viewer
Declare @rootAppEngId int
CREATE TABLE #Attribs(attrib varchar(150))
INSERT INTO #Attribs (attrib) VALUES
------------------------------------------------
--Configure Required Attributes below
------------------------------------------------
('.Engine.Historian.ConnectState'),
('.Scheduler.TimeIdleAvg'),
('.Engine.ProcessCPULoad'),
('.Scheduler.ScanOverrunsConsecCnt')
------------------------------------------------
SELECT @rootAppEngId = [template_definition_id]
FROM [dbo].[template_definition]
Where original_template_tagname = '$AppEngine'
SELECT(
SELECT 'Engine Audit' as "Tab", (
SELECT t1.[hierarchical_name] + t2.attrib as ReferenceString
FROM [dbo].[gobject] as t1
JOIN #Attribs as t2
on 1 = 1
where t1.template_definition_id = @rootAppEngId
AND t1.[is_template] = 0
AND t1.deployed_package_id <> 0
ORDER BY ReferenceString
FOR XML PATH(''), type
) FOR XML RAW('Watch'), type
) FOR XML RAW('VisualLMXTestTool')
DROP TABLE #Attribs