Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > 3 3 3

CREATE XADATASOURCE

3
Use the CREATE XADATASOURCE statement to create a new XA-compliant 3data source and create an entry for it in the sysxadatasources system catalog table. Only Dynamic Server supports this statement, which 3is an extension to the ANSI/ISO standard for SQL. 3
3

Syntax

3
3
Read syntax diagramSkip visual syntax diagram3>>-CREATE XADATASOURCE--xa_source--USING--xa_type--------------><
3 
3 3 333333333333333333333333
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 Database Object Name, p. Database Object Name
xa_type Name of an existing XA data source type Must already exist in the database in the sysxasourcetypes system catalog table Database Object Name, p. Database Object Name
3
3

Usage

3
3

An XA-compliant data 3source is an external data source that complies with the X/Open DTP XA Standard 3for managing interactions between a transaction manager and a resource manager. 3To register XA-compliant data sources in the database requires two SQL statements:

3

You can integrate transactions at the XA data source with the Dynamic 3Server transaction, using a 2-phase commit protocol to ensure that transactions 3are uniformly committed or rolled back among multiple database servers, and 3manage multiple external XA data sources within the same global transaction.

3

Any 3user can create an XA data source, which follows standard owner-naming rules, 3according to the ANSI-compliance status of the database. Only a database that 3uses transaction logging can support the X/Open DTP XA Standard.

3

Both 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.

3

The following statement creates a new XA data source instance called informix.NewYork of type informix.MQSeries.

3
CREATE XADATASOURCE informix.NewYork USING informix.MQSeries;
3
3

Related Information

3
3

Related statements: CREATE XADATASOURCE TYPE, DROP XADATASOURCE, DROP XADATASOURCE TYPE

3

For the schema of the sysxadatasources system catalog 3table, see the documentation notes to the IBM Informix Guide to SQL: Reference. 3For more information on XA data sources, see the IBM Informix DataBlade API Programmer's Guide.

3
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]