idser.xsd 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM and/or HCL
  4. IBM Informix Dynamic Server
  5. Copyright IBM Corporation 2008, 2011
  6. (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
  7. Title: idser.xsd
  8. XML Schema Definition for Informix Dynamic Server Enterprise Replication
  9. Aborted Transaction Spooling and Row Information Spooling files
  10. Note: If Enterprise Replication could not able to obtain database name,
  11. table name, owner name or server name information then their values
  12. will be set to "*UNKNOWN*".
  13. Version 1
  14. -->
  15. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
  16. <!-- ==== ROOT TAG ==== -->
  17. <xs:element name="ERFILE">
  18. <xs:complexType>
  19. <xs:choice>
  20. <xs:element ref="ATS"/>
  21. <xs:element ref="RIS"/>
  22. </xs:choice>
  23. <xs:attribute name="version" type="xs:integer" default="1"/>
  24. </xs:complexType>
  25. </xs:element>
  26. <!-- ====================== Items Common to ATS and RIS ====================== -->
  27. <!-- ==== Source server information ==== -->
  28. <xs:element name="SOURCE">
  29. <xs:complexType>
  30. <xs:attribute name="id" type="xs:integer" use="required"/>
  31. <xs:attribute name="name" type="xs:string" use="required"/>
  32. <!-- ==== Format example: 2008-11-08T20:16:25 ==== -->
  33. <xs:attribute name="commitTime" type="xs:dateTime" use="required"/>
  34. </xs:complexType>
  35. </xs:element>
  36. <!-- ==== Target server information ==== -->
  37. <xs:element name="TARGET">
  38. <xs:complexType>
  39. <xs:attribute name="id" type="xs:integer" use="required"/>
  40. <xs:attribute name="name" type="xs:string" use="required"/>
  41. <!-- ==== Format example: 2008-11-08T20:16:25 ==== -->
  42. <xs:attribute name="receiveTime" type="xs:dateTime" use="required"/>
  43. </xs:complexType>
  44. </xs:element>
  45. <!-- ==== Optional shadow column values for local and replicated rows ==== -->
  46. <xs:element name="SHADOWCOLUMNS">
  47. <xs:complexType>
  48. <xs:attribute name="serverID" type="xs:integer" use="required"/>
  49. <xs:attribute name="serverName" type="xs:string" use="required"/>
  50. <!-- ==== GMT time ==== -->
  51. <xs:attribute name="cdrTimeInt" type="xs:integer" use="required"/>
  52. <!-- ==== Format example: 2008-11-08T20:16:25 ==== -->
  53. <xs:attribute name="cdrTimeString" type="xs:dateTime" use="required"/>
  54. </xs:complexType>
  55. </xs:element>
  56. <xs:element name="SQLERROR">
  57. <xs:complexType>
  58. <xs:attribute name="num" type="xs:integer" use="required"/>
  59. </xs:complexType>
  60. </xs:element>
  61. <xs:element name="ISAMERROR">
  62. <xs:complexType>
  63. <xs:attribute name="num" type="xs:integer" use="required"/>
  64. </xs:complexType>
  65. </xs:element>
  66. <!-- ==== Datasync error codes ==== -->
  67. <xs:element name="CDRERROR">
  68. <xs:complexType>
  69. <xs:attribute name="num" type="xs:integer" use="required"/>
  70. <xs:attribute name="description" type="xs:string"/>
  71. </xs:complexType>
  72. </xs:element>
  73. <xs:element name="MESSAGE" type="xs:string"/>
  74. <!--
  75. COLUMN tag holds column data for replicated table.
  76. name attribute identifies column name.
  77. dataExists identifies whether data exists for this column or not.
  78. isLOBorUDT identifies whether column is of type UDT, smart large object or
  79. simple large object. if isLOBorUDT set to "true" then data for these
  80. columns will be skipped and dataExists value will be set to false.
  81. isHex set to true if column data dumped in hex format. This happens when
  82. Enterprise Replication doesn't have much information to interpret the
  83. row data.
  84. -->
  85. <xs:element name="COLUMN">
  86. <xs:complexType>
  87. <xs:simpleContent>
  88. <xs:extension base="xs:string">
  89. <xs:attribute name="name" type="xs:string" use="required"/>
  90. <xs:attribute name="dataExists" type="xs:boolean" default="true"/>
  91. <xs:attribute name="isHex" type="xs:boolean" default="false"/>
  92. <xs:attribute name="isLOBorUDT" type="xs:boolean" default="false"/>
  93. <xs:attribute name="isNull" type="xs:boolean" default="false"/>
  94. </xs:extension>
  95. </xs:simpleContent>
  96. </xs:complexType>
  97. </xs:element>
  98. <!-- ==== DATA tag holds row data ==== -->
  99. <xs:element name="DATA">
  100. <xs:complexType>
  101. <xs:sequence>
  102. <!-- ==== COLUMN tag holds column data ==== -->
  103. <xs:element ref="COLUMN" minOccurs="0" maxOccurs="unbounded"/>
  104. </xs:sequence>
  105. <xs:attribute name="dataExists" type="xs:boolean" default="true"/>
  106. </xs:complexType>
  107. </xs:element>
  108. <!-- ==== REPLICATED tag holds replicated row data ==== -->
  109. <xs:element name="REPLICATED">
  110. <xs:complexType>
  111. <xs:sequence>
  112. <!-- ==== Holds shadow column values ==== -->
  113. <xs:element ref="SHADOWCOLUMNS" minOccurs="0"/>
  114. <!-- ==== Holds row data ==== -->
  115. <xs:element ref="DATA"/>
  116. </xs:sequence>
  117. </xs:complexType>
  118. </xs:element>
  119. <!-- ============== ATS file specific tags ================== -->
  120. <xs:element name="ATS">
  121. <xs:complexType>
  122. <xs:sequence>
  123. <!--
  124. TRANSACTION tag holds RIS file name (if it exists) and number of
  125. rows processed before aborting the transaction.
  126. -->
  127. <xs:element ref="TRANSACTION"/>
  128. <!-- ==== ATSROWS tag holds multiple replicated rows ==== -->
  129. <xs:element ref="ATSROWS"/>
  130. </xs:sequence>
  131. <xs:attribute name="version" type="xs:integer" default="1"/>
  132. </xs:complexType>
  133. </xs:element>
  134. <xs:element name="TRANSACTION">
  135. <xs:complexType>
  136. <xs:sequence>
  137. <!-- Source server information -->
  138. <xs:element ref="SOURCE"/>
  139. <!-- Target server information -->
  140. <xs:element ref="TARGET"/>
  141. <xs:element ref="MESSAGE" minOccurs="0" maxOccurs="unbounded"/>
  142. <xs:element ref="CDRERROR" minOccurs="0"/>
  143. <xs:element ref="SQLERROR" minOccurs="0"/>
  144. <xs:element ref="ISAMERROR" minOccurs="0"/>
  145. <xs:element ref="SPLCODE" minOccurs="0"/>
  146. </xs:sequence>
  147. <xs:attribute name="RISFile" type="xs:string"/>
  148. <!-- generateRISFile will be set to true when RIS file exists for this
  149. aborted transaction -->
  150. <xs:attribute name="generateRISFile" type="xs:boolean" default="false"/>
  151. <!-- Number of rows processed before aborting the transaction. -->
  152. <xs:attribute name="processedRows" type="xs:integer" use="required"/>
  153. </xs:complexType>
  154. </xs:element>
  155. <!-- Tag for each replicated row data. -->
  156. <xs:element name="ATSROW">
  157. <xs:complexType>
  158. <xs:sequence>
  159. <!-- Indicates row data is for replicated row. -->
  160. <xs:element ref="REPLICATED"/>
  161. </xs:sequence>
  162. <!-- row sequence number -->
  163. <xs:attribute name="num" type="xs:integer" use="required"/>
  164. <!-- replicate id -->
  165. <xs:attribute name="replicateID" type="xs:integer" use="required"/>
  166. <!-- database name -->
  167. <xs:attribute name="database" type="xs:string" use="required"/>
  168. <!-- table owner -->
  169. <xs:attribute name="owner" type="xs:string" use="required"/>
  170. <!-- table name -->
  171. <xs:attribute name="table" type="xs:string" use="required"/>
  172. <!-- operation type -->
  173. <xs:attribute name="operation" use="required">
  174. <xs:simpleType>
  175. <xs:restriction base="xs:NMTOKEN">
  176. <xs:enumeration value="Insert"/>
  177. <xs:enumeration value="SyncRow"/>
  178. <xs:enumeration value="ConvInsert"/>
  179. <xs:enumeration value="KeyInsert"/>
  180. <xs:enumeration value="Update"/>
  181. <xs:enumeration value="Delete"/>
  182. <xs:enumeration value="ConvDelete"/>
  183. <xs:enumeration value="KeyDelete"/>
  184. <xs:enumeration value="Unknown"/>
  185. </xs:restriction>
  186. </xs:simpleType>
  187. </xs:attribute>
  188. </xs:complexType>
  189. </xs:element>
  190. <!-- ==== holds multiple replicated rows ==== -->
  191. <xs:element name="ATSROWS">
  192. <xs:complexType>
  193. <xs:sequence>
  194. <!-- ==== holds one replicated row ==== -->
  195. <xs:element ref="ATSROW" maxOccurs="unbounded"/>
  196. </xs:sequence>
  197. </xs:complexType>
  198. </xs:element>
  199. <!-- ================= RIS file specific tags================= -->
  200. <xs:element name="RIS">
  201. <xs:complexType>
  202. <xs:sequence>
  203. <!-- Source server information -->
  204. <xs:element ref="SOURCE"/>
  205. <!-- Target server information -->
  206. <xs:element ref="TARGET"/>
  207. <!-- holds multiple replicated and locale rows -->
  208. <xs:element ref="RISROWS"/>
  209. <xs:choice>
  210. <!-- indicates transaction is aborted -->
  211. <xs:element ref="TXNABORTED"/>
  212. <!-- indicates transaction is committed -->
  213. <xs:element ref="TXNCOMMITTED"/>
  214. </xs:choice>
  215. </xs:sequence>
  216. <!-- RIS file format version number -->
  217. <xs:attribute name="version" type="xs:integer" default="1"/>
  218. <!-- fromSource will be set to true if the ris file is
  219. generated at source server in grouper sub-component of ER.
  220. -->
  221. <xs:attribute name="fromSource" type="xs:boolean" default="false"/>
  222. </xs:complexType>
  223. </xs:element>
  224. <!-- Holds information about local and replicated row data for one aborted row -->
  225. <xs:element name="RISROW">
  226. <xs:complexType>
  227. <xs:sequence>
  228. <xs:element ref="MESSAGE" minOccurs="0" maxOccurs="unbounded"/>
  229. <xs:element ref="CDRERROR" minOccurs="0"/>
  230. <xs:element ref="SQLERROR" minOccurs="0"/>
  231. <xs:element ref="ISAMERROR" minOccurs="0"/>
  232. <xs:element ref="SPLCODE" minOccurs="0"/>
  233. <xs:element ref="MESSAGE" minOccurs="0" maxOccurs="unbounded"/>
  234. <!-- Holds local row data for corresponding replicated row -->
  235. <xs:element ref="LOCAL" minOccurs="0"/>
  236. <!-- Replicated row data -->
  237. <xs:element ref="REPLICATED"/>
  238. </xs:sequence>
  239. <!-- Row sequence number -->
  240. <xs:attribute name="num" type="xs:integer" use="required"/>
  241. <!-- Replicated Id -->
  242. <xs:attribute name="replicateID" type="xs:integer" use="required"/>
  243. <!-- Database name -->
  244. <xs:attribute name="database" type="xs:string" use="required"/>
  245. <!-- table owner name -->
  246. <xs:attribute name="owner" type="xs:string" use="required"/>
  247. <!-- table name -->
  248. <xs:attribute name="table" type="xs:string" use="required"/>
  249. <!-- operation type -->
  250. <xs:attribute name="operation" use="required">
  251. <xs:simpleType>
  252. <xs:restriction base="xs:NMTOKEN">
  253. <xs:enumeration value="Insert"/>
  254. <xs:enumeration value="SyncRow"/>
  255. <xs:enumeration value="ConvInsert"/>
  256. <xs:enumeration value="KeyInsert"/>
  257. <xs:enumeration value="Update"/>
  258. <xs:enumeration value="Delete"/>
  259. <xs:enumeration value="ConvDelete"/>
  260. <xs:enumeration value="KeyDelete"/>
  261. <xs:enumeration value="Unknown"/>
  262. </xs:restriction>
  263. </xs:simpleType>
  264. </xs:attribute>
  265. </xs:complexType>
  266. </xs:element>
  267. <!-- Holds multiple local and replicated aborted rows -->
  268. <xs:element name="RISROWS">
  269. <xs:complexType>
  270. <xs:sequence>
  271. <!-- Holds local and replicated aborted row data for one row -->
  272. <xs:element ref="RISROW" maxOccurs="unbounded"/>
  273. </xs:sequence>
  274. </xs:complexType>
  275. </xs:element>
  276. <!-- SPL CODE from stored procedure conflict rule set by user -->
  277. <xs:element name="SPLCODE">
  278. <xs:complexType>
  279. <xs:attribute name="num" type="xs:integer" use="required"/>
  280. </xs:complexType>
  281. </xs:element>
  282. <!-- Local row data for aborted row -->
  283. <xs:element name="LOCAL">
  284. <xs:complexType>
  285. <xs:sequence>
  286. <!-- Local row shadow column values -->
  287. <xs:element ref="SHADOWCOLUMNS" minOccurs="0"/>
  288. <xs:element ref="DATA"/>
  289. </xs:sequence>
  290. </xs:complexType>
  291. </xs:element>
  292. <!-- Indicates that replicated txn was aborted -->
  293. <xs:element name="TXNABORTED">
  294. <xs:complexType>
  295. <!-- ATS file name if transaction was aborted and ATS file was
  296. created for this aborted row. generateATSFile will be set to
  297. true when ATS file was created.
  298. -->
  299. <xs:attribute name="ATSFile" type="xs:string"/>
  300. <xs:attribute name="generateATSFile" type="xs:boolean" default="false"/>
  301. <!-- Error description for aborted transaction -->
  302. <xs:attribute name="TxnErr" type="xs:string"/>
  303. </xs:complexType>
  304. </xs:element>
  305. <!-- Indicates that replicated txn was committed -->
  306. <xs:element name="TXNCOMMITTED">
  307. <xs:complexType>
  308. <xs:attribute name="totalRows" type="xs:integer" use="required"/>
  309. </xs:complexType>
  310. </xs:element>
  311. </xs:schema>