Configuring Microsoft SQL Server for XA

22 Jul 2015 - 07:22 | Version 8 | | ,

AtomikosDataSourceBean example

AtomikosDataSourceBean ds = new AtomikosDataSourceBean();
Properties p = new Properties();
p.setProperty ( "user" , "mssql" );
p.setProperty ( "password" , "microsoft" );
p.setProperty ( "serverName" , "localhost-mssql" );
ds.setXaProperties ( p );


SQL Server version 2005 Express with Microsoft JDBC driver version 1.2 is known to be working fine. The Microsoft JDBC driver version 1.1 has a lot of problems with XA support and is not supported.

Getting XA support in SQL server is no easy task.

You have to copy the sqljdbc_xa.dll inside SQL Server's binn folder then execute xa_install.sql as user sa as documented. You must also enable MS DTC's XA support and grant SqlJDBCXAUser role to your user as explained here:

Note to Windows XP users: Windows XP lacks some internal components related to DTC. Microsoft has fixed this issue and released a Hotfix:

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2015 Atomikos BVBA