Re: Behavior of Connection.commit()
Angel Saenz-Badillos[MS] wrote:
"The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION."
This could be a very serious error. This may not be what is affecting your
scenario but here is some information that may be applicable. The basic
problem is that high severity SQL exceptions (level 16 or higher) can
rollback the transaction on the server. When this happens the old driver was
masking the error during COMMIT with something like the following TSQL:
IF @@TRANCOUNT > 0 COMMIT TRAN //If there is a transaction active commit
it, otherwise do nothing.
We decided that faking a transaction commit was a bad idea and in the new
driver replaced it with something like:
COMMIT TRAN //Commit transaction, if no transaction active throw exception.
What this means is that the following scenario would behave
//start transaction
//insert data 1
//execute something that throws lev 16 server exception and ignore
exception. At this time insert data 1 has been rolled back!
//insert data 2
//COMMIT
In the old driver in this scenario commit would silently "work" (not throw
an exception), even though insert data 1 has been rolled back. In the new
driver this will now throw an exception and you will at least know that not
all is well. We felt that it was an important breaking change to make.
Interesting... So what does the driver do with:
c = d.connect(URL, props);
c.setAutoCommit(false); // does *not start a tx*
s.commit();
Also, when the driver throws the exception above, in
a circumstance you suggest, presumably the connection
is still in autoCommit(false) mode. Is it?
Joe Weinstein at BEA Systems.
.
Relevant Pages
- Re: windows error codes
... Driver Development Tools: Windows DDK ... This indicates that a kernel-mode program generated an exception which the error handler did not catch. ... For a complete list of exception codes, see the ntstatus.h file located in the inc directory of the Windows DDK. ... This article describes how to troubleshoot a "STOP 0x0000001E KMODE_EXCEPTION_NOT_HANDLED" error message. ... (microsoft.public.windowsxp.general) - RE: getting Kmode Exception Not Handled error
... The address at which the exception occurred 0xf7163ab0 ... Faulty device driver or system service. ... Disabling memory caching of the BIOS might also resolve the error. ... (microsoft.public.win2000.setup) - Re: BSOD
... This indicates that a kernel-mode program generated an exception which the ... the inc directory of the Windows Driver Kit. ... Make sure you have enough disk space. ... with your hardware vendor for any BIOS updates. ... (microsoft.public.windows.server.general) - Re: x64 XP BSOD on USB device reset or D3 entry
... Have you tried running the test with driver verifier with special pool ... I did not assign any cleanup routine to any KMDF object. ... The completion routine only deletes objects that were allocated to ... The exception code that was not handled ... (microsoft.public.development.device.drivers) - x64 XP BSOD on USB device reset or D3 entry
... is a non-trivial device that must be managed by the USB device driver. ... The exception code that was not handled ... total locks, 1 locks currently held ... This BSOD also occurs if I send the reset message to the USB device without ... (microsoft.public.development.device.drivers) |
|