SAP Knowledge Base Article - Preview

2207664 - RPC failure with CREATE TABLE command is not allowed within a multi-statement transaction in the tempdb database." - SAP ASE

Symptom

  • Error 2762 when executing a remote procedure:

-- procedure on the local ASE server
create proc hc_dev_t2_issue
as
  print ' At tier2 about to call tier3 stored procedure '
 BEGIN TRAN devtest
  exec T3_ASE.mydb..hc_dev_t3_issue
 print ' At tier2 after to call tier3 stored procedure '
 COMMIT TRAN devtest
go
exit

-- procedure on the ASE remote server - called by procedure in the local  ASE server
create proc hc_dev_t3_issue
as
  print ' At tier3 '
 create table #test ( smt_id int )
 BEGIN TRAN T3tran
  PRINT "T3tran"
  insert into #test
   select smt_id from testdb..smt
 COMMIT TRAN T3tran
        select * from #test 
go
exit

-- execute the procedure on the local ASE server
exec hc_dev_t2_issue

 At tier2 about to call tier3 stored procedure
 At tier3
Msg 2762, Level 16, State 3:
Server 'ASE_2', Procedure 'hc_dev_t3_issue', Line 8:
The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
T3tran
Msg 208, Level 16, State 6:
Server 'ASE_2', Procedure 'hc_dev_t3_issue', Line 14:
#test not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRAN is missing. Previous count = 1, Current count = 2.
 At tier2 after to call tier3 stored procedure
Msg 5605, Level 16, State 1:
Server 'ASE_22', Procedure 'hc_dev_t2_issue', Line 14:
Prepare transaction RPC to the remote server 'T3_ASE' failed. Transaction key '000098d4000b00004ed954d80004'. Return status -128.
(return status = -6)

  • The same RPC call works fine in another environment.


Read more...

Environment

  • SAP Adaptive Server Enterprise 12.5.x
  • SAP Adaptive Server Enterprise 15.x
  • SAP Adaptive Server Enterprise 16.0
  • Dataserver

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0 ; Sybase Adaptive Server Enterprise 15.0 ; Sybase Adaptive Server Enterprise 15.5

Keywords

KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.