'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database

'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database

book

Article ID: KB0076225

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database 7.x

Description

When a client is trying to use the DDL commands in multi-statement transactions then following SQLException thrown by the database that will be available in Adapter logs.
========
com.tibco.adapter.adb.database.DBSQLException: java.sql.SQLException: [tibcosoftwareinc][Sybase JDBC Driver][Sybase]The 'CREATE 
TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
========

Cause:
======
Typically this error occurs in the context of data definition commands such as creating, altering or dropping objects. It occurs when Adaptive Server detects a command that is not allowed in a multi-statement transaction for the specified database.
 

Issue/Introduction

'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database

Environment

Environment: TIBCO ActiveMatrix BusinessWorks Plug-in for Database Version: 7.x Database: Sybase OS: All Supported Operating Systems

Resolution

This issue will be resolved after setting the ddl in tran to “true” before running the transaction that can be check with the current setting of ddl in tran with sp_helpdb and prepend the "commit" before stored procedure call query in Adapter Request-Response Service activity i.e commit exec <procedure_name>  
e.g commit exec showdept3 @deptname='2', @TASK_CODE='1'.

 

Additional Information

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00729.1500/html/errMessageAdvRes/BABFDFIB.htm