Sybase ASE的XA Transactions(分布式事务处理)

本文介绍如何在ASE中配置并使用XA事务处理,包括必要的许可验证、数据库配置步骤及连接缓存设置等关键技术点。
ASE支持分布式事务处理,需要一些额外配置。
Using XA resources with Adaptive Server Enterprise
To use XA resources with an Adaptive Server Enterprise 12.0 or later database running on UNIX or Windows, perform these tasks:

(Windows only.) Verify that you have the correct license file, which is located in %SYBASE%/SYSAM-1_0/licenses/license.dat. To run XA transactions, you must have the ASE_DTM license.

Configure the database to use XA transactions. For more information, see Using the Adaptive Server Distributed Transaction Management Features, available on the Sybase Product Manuals Web page.
Create a database to use for XA transactions.

Configure the database tables and stored procedures required for JDBC connection caches, which are available in $JAGUAR/html/classes/sp/sql_server12.sql.
Configure the database tables required for C/C++ connection caches. You can install these tables by running xa_load.sh (UNIX) or xa_load.bat (Windows), which is located in the EAServer html/classes/sp directory.

Create a login, other than sa, for connecting to the database. You cannot use the sa login to connect to an Adaptive Server Enterprise databases for XA transactions.
Modifying the Adaptive Server configuration files
When you configure an XA resource for C/C++ connection caches, you need to modify two configuration files.
On UNIX:
$JAGUAR/interfaces
$JAGUAR/xa_config
On Windows:
%JAGUAR%/ini/sql.ini
%JAGUAR%/ini/xa_config
interfaces and sql.ini
On UNIX, add these lines to the interfaces file:
DbServer
master tcp ether host 5300
query tcp ether host 5300
On Windows, add these lines to the sql.ini file:
[DbServer]
master=NLWNSCK,host,5200
query=NLWNSCK,host,5200

where DbServer is the name of the database server and host is the name of the machine on which the database server runs. DbServer should have the same value that you entered in the Server Name field when you configured the XA resource.

xa_config
For both operating systems, add these lines to the xa_config file:
[xa]
lrm=serverName
server=DbServer
where:
serverName is the name you entered in the Server Name field when you configured the XA resource.
DbServer is the name of the server you entered in either the interfaces file or the sql.ini file.
serverName and DbServer represent the same server and should have the same value.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值