Javax.transaction.xa.XAException:java.sql.SQLException: The XA control connection could not be created. (SQL 2000,sql2005,sql2008)

Source: Internet
Author: User

Javax.transaction.xa.XAException:java.sql.SQLException: The XA control connection could not be created. Error: The stored procedure ' master ' could not be found. Xp_sqljdbc_xa_init '.

Configure JTA SQL Server Xadatasource Reference: http://technet.microsoft.com/zh-cn/library/aa342335.aspx

Source: http://blog.csdn.net/gjf8510/article/details/16118687

1.sqljdbc_3.0\chs\auth\x86 (x64| IA64) \sqljdbc_auth.dll into the Windows\System32

2.sqljdbc_3.0\chs\xa\x86 (x64| IA64) \sqljdbc_xa.dll into Microsoft Sqlserver\mssql\binn\sqljdbc_xa.dll

3. Executive Xa_install.sql

4. Grant permissions to the SQL Server logon user. Can participate in: http://www.blogjava.net/zyw090111/

If you want to use both the XA data source and the Microsoft Distributed Transaction Coordinator (MS DTC) to handle distributed transactions, you need to perform the following steps
(1) on Windows XP and Windows Server 2003:

1. In the Control Panel, open Administrative Tools, and then open Component Services. You can also click the Start button, click Run, type dcomcnfg in the Open box, and then press OK to open Component Services.

2. Expand Component Services, Computers, right-click My Computer, and then select Properties.

3. Click the MSDTC tab, and then click Security Configuration.

4. Select the Enable XA transactions check box, and then click OK. This will cause the MS DTC service to restart.

5. Click OK again to close the Properties dialog box, and then close Component Services.

6. Stop SQL Server, and then restart to ensure that it synchronizes with MS DTC changes.

(2) on Win8 or Server 2008:

1. In the Control Panel, open Administrative Tools, and then open Component Services. You can also click the Start button, click Run, type dcomcnfg in the Open box, and then press OK to open Component Services.

2. Expand Component Services \ computer \ Distribute Transaction Coordinator, right-click Local DTC, and select Properties.

3. Click the Security tab, and then click Enable XA transactions.

4. Then click OK. This will cause the MS DTC service to restart.

5. Click OK again to close the Properties dialog box, and then close Component Services.

6. Stop SQL Server, and then restart to ensure that it synchronizes with MS DTC changes.

Note: After these configurations are complete, if they also occur:

Error: Atomikos:error in recovery.

1. There is a problem with the driver. That is Sqljdbc4.jar. I have previously encountered this problem and re-downloaded the "Sqljdbc_3.0.1301.101_chs.exe" on the Miscrosoft website, after the decompression, all the configuration is used to unpack the files in the package. Include (Sqljdbc_xa.dll)

2.SQL Server 2000 is configured with a file of x86 (that is, 32) bits. SQL Server 2000 is still 32-bit, because the query parser enters "SELECT @ @version" To view the version of SQL, even though the operating system is the Server 2003 X64 bit.

Enter "SELECT @ @version" on WIn8 to get the version number "Microsoft SQL Server R2 (RTM)-10.50.1600.1 (X64) APR 2 15:48:46 Copyrig HT (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200:), which shows that SQL Server is X6 4 of the.

3.SQL Server 2000 When configuring JTA Xadatasource, if the Sqljdbc.jar package is used, there is no com.microsoft.sqlserver.jdbc.SQLServerXADataSource for that class. Therefore, SQL Server 2000 is also configured with the Sqljdbc4.jar package.

There should be nothing wrong with this. Troubled me 1 weeks of the problem ah, if all the configuration is also a problem, it must be the JDBC driver has problems, thanks to a network friend's reminder!!! Thanks here.

Javax.transaction.xa.XAException:java.sql.SQLException: The XA control connection could not be created. (SQL 2000,sql2005,sql2008)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.