JTA Support: Installing Stored Procedures
- Last Updated: May 15, 2020
- 2 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Note: The SQL Server driver does not support distributed transactions through JTA
for the Microsoft Windows Azure SQL Database.
To use JDBC distributed transactions through JTA, use the following procedure to install Microsoft SQL Server JDBC XA procedures. Repeat this procedure for any Microsoft SQL Server installation that uses distributed transactions.
If you have multiple instances of Microsoft SQL Server on the same machine, you can edit the instjdbc.sql script with a text editor to specify a fully qualified path to the sqljdbc.dll file for a particular instance. For example, if you want to install XA Procedures for an instance named "MSSQL.2," modify the instjdbc.sql script as shown and run it as described in the following procedure.
/*
** add references for the stored procedures
*/
print 'creating JDBC XA procedures'
go
sp_addextendedproc 'xp_jdbc_open',
'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_open2',
'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_close',
'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_close2',
'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_start',
'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\sqljdbc.dll'
...
Note: For Microsoft SQL Server 2005 and higher, you can use the Microsoft SQL
Server Configuration Manager tool to view Microsoft SQL Server services and determine the
fully qualified path to the \Binn subdirectory of each Microsoft SQL Server instance on a
machine. Using the Configuration Manager, right-click on a service and select Properties.
Select the Service tab. The path is shown as a value of the Binary Path attribute. For
Microsoft SQL Server 2000, you can use the SQL Server Enterprise Manager. Refer to your
Microsoft SQL Server documentation for details.
To install stored procedures for JTA: