CREATE XADATASOURCE statement
Use the CREATE XADATASOURCE statement to create a new XA-compliant data source and create an entry for it in the sysxadatasources system catalog table. This statement is an extension to the ANSI/ISO standard for SQL.
Syntax
Element | Description | Restrictions | Syntax |
---|---|---|---|
xa_source | Name that you declare here for the new XA data source | Must be unique among XA data source names in sysxadatasources | Identifier |
xa_type | Name of an existing XA data source type | Must already exist in the database in the sysxasourcetypes system catalog table | Identifier |
Usage
- First create one or more XA-compliant data source types by using the CREATE XADATASOURCE TYPE statement.
- Then create one or more instances of XA-compliant data sources with the CREATE XADATASOURCE statement.
The CREATE XADATASOURCE statement is not supported on secondary servers within a high-availability cluster.
Any user can create an XA data source, which follows standard owner-naming rules, according to the ANSI-compliance status of the database. Only a database that uses transaction logging can support the X/Open DTP XA Standard.
If you include the optional IF NOT EXISTS keywords, the database server takes no action (rather than sending an exception to the application) if an XA data source of the specified name is already registered in the current database.
Both XA data source types and instances of XA data sources are specific to one database. To support distributed transactions, they must be created in each database that interacts with the external XA data source.
CREATE XADATASOURCE informix.NewYork USING informix.MQSeries;
- CLOSE DATABASE
- CREATE DATABASE
- DROP DATABASE
- SET LOG
- SAVEPOINT
- RELEASE SAVEPOINT
- ROLLBACK TO SAVEPOINT