-
Notifications
You must be signed in to change notification settings - Fork 43
/
ExportQuery.xml
86 lines (85 loc) · 3.7 KB
/
ExportQuery.xml
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
<!-- Derived using the SQL below:
select '<Item type=''' + name + ''' action=''get'' select=''config_id''>'
+ case when name = 'Identity' then '<is_alias>0</is_alias>' else '' end
+ '</Item>' AML
from innovator.[ITEMTYPE]
where INSTANCE_DATA in (
SELECT ta.name TableName
FROM sys.tables ta
INNER JOIN sys.partitions pa
ON pa.OBJECT_ID = ta.OBJECT_ID
INNER JOIN sys.schemas sc
ON ta.schema_id = sc.schema_id
WHERE ta.is_ms_shipped = 0
AND pa.index_id IN (1,0)
and ta.name in (select it.instance_data from innovator.ItemType it)
and not ta.name in (select it.INSTANCE_DATA
from innovator.[RELATIONSHIPTYPE] rt
inner join innovator.[ITEMTYPE] it
on it.id = rt.RELATIONSHIP_ID)
and not ta.name in (
'ACTIVITY2'
, 'ACTIVITY_TEMPLATE'
, 'APPLIED_UPDATES'
, 'APQP_CAUSE_CATALOG'
, 'APQP_DETECTION_CATALOG'
, 'APQP_EFFECT_CATALOG'
, 'APQP_FAILURE_MODE_CATALOG'
, 'APQP_MEASUREMENT_TECHNIQUE'
, 'APQP_OCCURRENCE_CATALOG'
, 'APQP_SEVERITY_CATALOG'
, 'BUSINESS_CALENDAR_YEAR'
, 'CAD'
, 'DATABASEUPGRADE'
, 'HISTORY_CONTAINER'
, 'MPROCESS_PLANNER'
, 'PACKAGEDEFINITION'
, 'PART'
, 'PREFERENCE'
, 'PROJECT'
, 'PROJECT_TEMPLATE'
, 'SAVEDSEARCH'
, 'USER'
, 'WBS_ELEMENT')
GROUP BY sc.name,ta.name
having SUM(pa.rows) <> 0)
order by 1
;
-->
<AML>
<Item type='Action' action='get' select='config_id'></Item>
<Item type='Chart' action='get' select='config_id'></Item>
<!--<Item type='ConversionServer' action='get' select='config_id'></Item>-->
<Item type='Dashboard' action='get' select='config_id'></Item>
<Item type='EMail Message' action='get' select='config_id'></Item>
<Item type='FileType' action='get' select='config_id'></Item>
<Item type='Form' action='get' select='config_id'></Item>
<Item type='Grid' action='get' select='config_id'></Item>
<Item type='History Action' action='get' select='config_id'></Item>
<Item type='History Template' action='get' select='config_id'></Item>
<Item type='Identity' action='get' select='config_id'><is_alias>0</is_alias></Item>
<Item type='ItemType' action='get' select='config_id'></Item>
<Item type='Language' action='get' select='config_id'></Item>
<Item type='Life Cycle Map' action='get' select='config_id'></Item>
<Item type='List' action='get' select='config_id'></Item>
<Item type='Locale' action='get' select='config_id'></Item>
<Item type='Method' action='get' select='config_id'></Item>
<Item type='Metric' action='get' select='config_id'></Item>
<Item type='Permission' action='get' select='config_id'></Item>
<Item type='PreferenceTypes' action='get' select='config_id'></Item>
<!--<Item type='PresentationConfiguration' action='get' select='config_id'></Item>-->
<Item type='Report' action='get' select='config_id'></Item>
<Item type='Revision' action='get' select='config_id'></Item>
<Item type='SearchMode' action='get' select='config_id'></Item>
<!--<Item type='SecureMessageViewTemplate' action='get' select='config_id'></Item>-->
<Item type='Sequence' action='get' select='config_id'></Item>
<Item type='SQL' action='get' select='config_id'></Item>
<!--<Item type='SSVCPresentationConfiguration' action='get' select='config_id'></Item>-->
<!--<Item type='SystemFileContainer' action='get' select='config_id'></Item>-->
<!--<Item type='Team' action='get' select='config_id'></Item>-->
<Item type='UserMessage' action='get' select='config_id'></Item>
<Item type='Variable' action='get' select='config_id'></Item>
<Item type='Vault' action='get' select='config_id'></Item>
<Item type='Viewer' action='get' select='config_id'></Item>
<Item type='Workflow Map' action='get' select='config_id'></Item>
</AML>