3>>-CREATE--XADATASOURCE TYPE--xa_type---------------------------> 3 3 .-,------------------------. 3 V (1) | 3>--(----| Purpose Options |------+--)-------------------------->< 33 3 3
Element | 3Description | 3Restrictions | 3Syntax | 3
---|---|---|---|
xa_type | 3Name that you declare here for a new XA data source type | 3Must be unique among XA data source type names in the sysxasourcetypes system catalog table | 3Database Object Name, p. Database Object Name | 3
The CREATE XADATASOURCE TYPE statement adds an XA-compliant data 3source type to the database.
3Any user can create an 3XA data source type, whose owner-naming rules depend on the ANSI-compliance 3status of the database. Only a database that uses transaction logging can 3support the X/Open DTP XA Standard.
3To create 3a data source type, you must declare its name and specify purpose functions and purpose values as attributes 3of the XA source type. Most of the purpose options that follow the source 3type name associate columns in the sysxasourcetypes system 3catalog table with the name of a UDR.
3Both XA data source types and instances of XA data sources are specific 3to one database. To support distributed transactions, they must be created 3in each database that interacts with the external XA data source.
3The following statement creates a new XA data source type called MQSeries, owned by user informix.
3CREATE XADATASOURCE TYPE 'informix'.MQSeries( 3 xa_flags = 1, 3 xa_version = 0, 3 xa_open = informix.mqseries_open, 3 xa_close = informix.mqseries_close, 3 xa_start = informix.mqseries_start, 3 xa_end = informix.mqseries_end, 3 xa_rollback = informix.mqseries_rollback, 3 xa_prepare = informix.mqseries_prepare, 3 xa_commit = informix.mqseries_commit, 3 xa_recover = informix.mqseries_recover, 3 xa_forget = informix.mqseries_forget, 3 xa_complete = informix.mqseries_complete);3
You need to provide one value or UDR name for each of the options listed 3above, but the sequence in which you list them is not critical. (The order 3of purpose options in this example corresponds to the order of column names 3in the sysxasourcetypes system catalog table.)
3After this statement executes successfully, you can create instances of 3type informix.MQSeries. The following statement creates 3a new instance called informix.MenloPark of XA-compliant 3data source type informix.MQSeries:
3CREATE XADATASOURCE informix.MenloPark USING informix.MQSeries;3
Related statements: CREATE XADATASOURCE, DROP XADATASOURCE, DROP XADATASOURCE TYPE
3For information about how to enter purpose-option specifications, see Purpose Options.
3For information on how to use XA data sources, see the IBM Informix DataBlade API Programmer's Guide.
3For the schema of the sysxasourcetypes table, see 3the documentation notes to the IBM Informix Guide to SQL: Reference.
3