sysbase客户端使用类似SELECT XXX INTO TEMPTABLE FROM TABLEA语句时很正常,但在java程序用jdbc连接后使用同样的语句报错:com.sybase.jdbc3.jdbc.SybSQLException: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
经查资料,只要用具有sa权限的用户登入,在master数据库下执行下列语句即可:
sp_dboption tempdb, 'ddl in tran', true
sp_dboption tempdb, 'allow nulls by default', true
字面上看应该就是修改下db的属性,生效后,java程序执行正常。