Exception with MS-SQL Server,JDBC and XA Transactions

后端 未结 2 1502
失恋的感觉
失恋的感觉 2021-02-15 08:20

I\'m getting the following exception in my log when I try to perform an XA transaction:

javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc_SQL

2条回答
  •  死守一世寂寞
    2021-02-15 09:00

    We only had to do the following:

    USE [master]
    GO
    CREATE USER [UserName] FOR LOGIN [UserName] WITH DEFAULT_SCHEMA=[dbo]
    use [master]
    GO
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_commit] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_end] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_forget] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_forget_ex] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_init] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_init_ex] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_prepare] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_prepare_ex] TO [UserName] 
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_recover] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_rollback] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_rollback_ex] TO [UserName]
    GRANT EXECUTE ON [dbo].[xp_sqljdbc_xa_start] TO [UserName]
    GO
    

提交回复
热议问题