Interlude: Troubleshooting for 'no corresponding BEGIN TRANSACTION'
2016-12-02 12:57
507 查看
When you exec script like
begin tran
exec tonytest
rollback tran
commit tran
You will see an error like
Msg 3902, Level 16, State 1, Line 4
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
To debug, just make sure only one of rollback and commit works in the same time.
In this case, just delete commit, then bug disappear.
It could be obvious to find out in this script because it's simple,
But when you making a script really complex, it could be hard to find out this bug.
begin tran
exec tonytest
rollback tran
commit tran
You will see an error like
Msg 3902, Level 16, State 1, Line 4
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
To debug, just make sure only one of rollback and commit works in the same time.
In this case, just delete commit, then bug disappear.
It could be obvious to find out in this script because it's simple,
But when you making a script really complex, it could be hard to find out this bug.
相关文章推荐
- CMN_1022: [FreeTDS][SQL Server]The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION
- Interlude: Troubleshooting for Failed to Declare Table-type Variables
- Interlude: Troubleshooting for 'Invalid object name'
- FNDCPASS Troubleshooting Guide For Login and Changing Applications Passwords
- Listener Hanging - Information to Get For Resolving or Troubleshooting (Doc ID 230156.1)
- How to Create a Performance Monitor Log for NT Troubleshooting [ZT-from MS]
- Using Service Trace Viewer for Viewing Correlated Traces and Troubleshooting
- FNDCPASS Troubleshooting Guide For Login and Changing Applications Passwords
- Installation Failure Troubleshooting for iOS
- Linux(R) Troubleshooting for System Administrators and Power Users
- Professoion Trouble shooting for Full filesystem
- RDO Havana Neutron Namespaces Troubleshooting for OVS&VLAN (GRE) Config
- How To Gather Information for Effective Troubleshooting of Performance Issues [ZT-from MS]
- FNDCPASS Troubleshooting Guide For Login and Changing Applications Passwords
- strace - A very powerful troubleshooting tool for[zt]
- Troubleshooting for error :Call to undefined function mysql_connect()
- Troubleshooting Lync FOR MAC client issue
- Peeking into Linux kernel-land using /proc filesystem for quick’n’dirty troubleshooting
- 《Troubleshooting SQL Server: A Guide for the Accidental DBA》电子书下载