Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
farid
Starting Member
2 Posts |
Posted - 2008-02-29 : 21:35:46
|
Hi all, back in the day we switched to SQLServer2005, we had trouble with fulltextsearch stored procedures, it wouldn't work because in 2005, calling those stored procedure (like sp_fulltext_table) would automatically create a transaction. The error is "procedure cannot be executed within a transaction" So the fix was to call execute those stored procedures in autocommit mode. It worked fine until switch from jDriver to jtds, while it was OK with jDriver, jtds is complaining that "commit() should not be called in autocommit mode" To summarize : if we don't set autocommit, the execution fails with the follwoing error Got exception=[java.sql.SQLException: The procedure 'sys.sp_fulltext_table' cannot be executed within a transaction.] for sql=[sp_fulltext_table 'AttrsBlobTab', 'create', 'AttrsBlobTab_cat', 'ARIBAPK334'] if we do set autocommit, execution fails with an other error Got exception=[java.sql.SQLException: commit() should not be called while in auto-commit mode.] for sql=[sp_fulltext_table 'AttrsBlobTab', 'create', 'AttrsBlobTab_cat', 'ARIBAPK204'] it seems like we can get around this with replacing stored procedures calls by DDL statements but it's really cumbersome in my case, I was wondering if there was a way to avoid this. Any idea ? Thanks, Farid |
|
|
|
|
|
|