Exception with MS-SQL Server,JDBC and XA Transactions

后端 未结 1 589
故里飘歌
故里飘歌 2021-02-15 08:37

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

1条回答
  •  清歌不尽
    2021-02-15 08:49

    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
    

    0 讨论(0)
提交回复
热议问题