(Researched and based from solutions offered at the OTN Discussion Forums)
When trying to setup an XA-compliant connection pool for WebLogic Server 8.1 that points to an MSSQL 2000 database, an extra step is usually needed to be able to make it accessible.
The usual way to create XA-compliant pools on MSSQL 2000 is listed below:
- Lookup the files instjdbc.sql and sqljdbc.dll from the BEA_HOME directory/weblogic81/server/lib
- Copy the DLL onto the installation directory of the MSSQL 2000 machine (i.e., C:\Program Files\Microsoft SQL Server\MSSQL\Binn )
- Open the master database of the said MSSQL server and run the contents of the instjdbc.sql file (which might necessarily be run twice because the first time will fail at times)
- Open services.msc, find the Distributed Transaction Coordinator and start it (if not running). You might want to set it to “Automatic” so in case this database machine restarts, starting the DTC won’t be missed out.
- Create the XA-compliant connection pool on the WebLogic 8.1 Server.
This has been shown to work for MSSQL 2000 servers where their OS is either Windows 2000 or Windows Server 2000; however, when the OS becomes Windows XP or Windows Server 2003 (XP’s server counterpart), this process will fail and result in a
[BEA][SQLServer JDBC Driver][SQLServer]xa_open (0) returns -3
error. To be able to get around this, you will need to take further steps as listed below to be able to setup XA-compliant connection pools with this OS. Turn on XA support for Windows 2003 as it is disabled by default in this version of Windows.
1. Open Component Services via Control Panel > Administrative Tools > Component Services
2. Right click on My Computer and click on Properties
3. Locate the MSDTC tab and click on the button Security Configuration…
5. Open the Registry Editor (regedit.exe on Run…). Navigate the tree list to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL
6. Create a new [String] registry value named XA DLL. Then, the value of this entry must be the full path of the sqljdbc.dll, i.e., C:\Program Files\Microsoft SQL Server\MSSQL\Binn\sqljdbc.dll
7. Close the Registry Editor and retry defining your XA-compliant MSSQL connection pool on your WebLogic Server. At this point, Testing your newly-created connection pool should now be successful.