Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SQLServerException: The server failed to resume the transa..

 
   Database Help (Home) -> JDBC Driver RSS
Next:  Cannot connect to my SQL 2005 server using JDBC -..  
Author Message
Scott Berry

External


Since: Apr 06, 2008
Posts: 2



(Msg. 1) Posted: Sun Apr 06, 2008 11:22 pm
Post subject: SQLServerException: The server failed to resume the transaction. D
Archived from groups: microsoft>public>sqlserver>jdbcdriver (more info?)

Hi All,

I have a block of code that does the following:

1. Call Stored Procedure A which internally:
a. Opens a transaction
b. Does work
c. Closes the transaction
2. Calls Stored Procedure B

When it runs it gives the following error:

SQLServerException: The server failed to resume the transaction. Desc:
and then one of the following error codes -
3800000001
3b00000001
4000000001

Auto commit is off and there is no transaction being initiated on the Java
side. When I run SQL profiler the only transaction being created is the one
inside the procedure.

If I remove the transaction management code from the proc then everything
works.

Has anyone seen this before or know how to fix it? I have a test harness if
anyone is interested.

Regards,

Scott

 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Omar Granados

External


Since: Apr 11, 2008
Posts: 1



(Msg. 2) Posted: Fri Apr 11, 2008 7:12 am
Post subject: RE: SQLServerException: The server failed to resume the transaction. D [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Scott Berry" wrote:

> Hi All,
>
> I have a block of code that does the following:
>
> 1. Call Stored Procedure A which internally:
> a. Opens a transaction
> b. Does work
> c. Closes the transaction
> 2. Calls Stored Procedure B
>
> When it runs it gives the following error:
>
> SQLServerException: The server failed to resume the transaction. Desc:
> and then one of the following error codes -
> 3800000001
> 3b00000001
> 4000000001
>
> Auto commit is off and there is no transaction being initiated on the Java
> side. When I run SQL profiler the only transaction being created is the one
> inside the procedure.
>
> If I remove the transaction management code from the proc then everything
> works.
>
> Has anyone seen this before or know how to fix it? I have a test harness if
> anyone is interested.
>
> Regards,
>
> Scott
>

 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Omar Granados

External


Since: Apr 11, 2008
Posts: 1



(Msg. 3) Posted: Fri Apr 11, 2008 7:14 am
Post subject: RE: SQLServerException: The server failed to resume the transaction. D [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi, I'm facing the same problem... could you find a solution..or the cause ???

"Scott Berry" wrote:

> Hi All,
>
> I have a block of code that does the following:
>
> 1. Call Stored Procedure A which internally:
> a. Opens a transaction
> b. Does work
> c. Closes the transaction
> 2. Calls Stored Procedure B
>
> When it runs it gives the following error:
>
> SQLServerException: The server failed to resume the transaction. Desc:
> and then one of the following error codes -
> 3800000001
> 3b00000001
> 4000000001
>
> Auto commit is off and there is no transaction being initiated on the Java
> side. When I run SQL profiler the only transaction being created is the one
> inside the procedure.
>
> If I remove the transaction management code from the proc then everything
> works.
>
> Has anyone seen this before or know how to fix it? I have a test harness if
> anyone is interested.
>
> Regards,
>
> Scott
>
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
joe.weinstein

External


Since: Feb 02, 2008
Posts: 15



(Msg. 4) Posted: Fri Apr 11, 2008 7:52 am
Post subject: Re: SQLServerException: The server failed to resume the transaction. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Apr 6, 11:22 pm, Scott Berry
wrote:
> Hi All,
>
> I have a block of code that does the following:
>
> 1. Call Stored Procedure A which internally:
> a. Opens a transaction
> b. Does work
> c. Closes the transaction
> 2. Calls Stored Procedure B
>
> When it runs it gives the following error:
>
> SQLServerException: The server failed to resume the transaction. Desc:
> and then one of the following error codes -
> 3800000001
> 3b00000001
> 4000000001
>
> Auto commit is off and there is no transaction being initiated on the Java
> side. When I run SQL profiler the only transaction being created is the one
> inside the procedure.
>
> If I remove the transaction management code from the proc then everything
> works.
>
> Has anyone seen this before or know how to fix it? I have a test harness if
> anyone is interested.
>
> Regards,
>
> Scott

You shouldn't mix Java transaction control (autoCommit(false)) with
DBMS-side transaction control (procedures or SQL doing 'BEGIN TRAN'
and 'COMMIT" etc.).
What happens if you just use a connection in it's default
autoCommit(true)
mode?
Joe Weinstein at BEA Systems
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Scott Berry

External


Since: Apr 06, 2008
Posts: 2



(Msg. 5) Posted: Sat Apr 12, 2008 10:46 pm
Post subject: RE: SQLServerException: The server failed to resume the transactio [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I found the root cause.

I wasn't closing the Statement object upon completion of the first database
call.

adding the following fixed it:
stmt.Close();

"Omar Granados" wrote:

> Hi, I'm facing the same problem... could you find a solution..or the cause ???
>
> "Scott Berry" wrote:
>
> > Hi All,
> >
> > I have a block of code that does the following:
> >
> > 1. Call Stored Procedure A which internally:
> > a. Opens a transaction
> > b. Does work
> > c. Closes the transaction
> > 2. Calls Stored Procedure B
> >
> > When it runs it gives the following error:
> >
> > SQLServerException: The server failed to resume the transaction. Desc:
> > and then one of the following error codes -
> > 3800000001
> > 3b00000001
> > 4000000001
> >
> > Auto commit is off and there is no transaction being initiated on the Java
> > side. When I run SQL profiler the only transaction being created is the one
> > inside the procedure.
> >
> > If I remove the transaction management code from the proc then everything
> > works.
> >
> > Has anyone seen this before or know how to fix it? I have a test harness if
> > anyone is interested.
> >
> > Regards,
> >
> > Scott
> >
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Tom Grant

External


Since: Jun 16, 2008
Posts: 1



(Msg. 6) Posted: Mon Jun 16, 2008 2:31 pm
Post subject: Re: SQLServerException: The server failed to resume the transactio [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"joeNOSPAM@bea.com" wrote:

> On Apr 6, 11:22 pm, Scott Berry
> wrote:
> > Hi All,
> >
> > I have a block of code that does the following:
> >
> > 1. Call Stored Procedure A which internally:
> > a. Opens a transaction
> > b. Does work
> > c. Closes the transaction
> > 2. Calls Stored Procedure B
> >
> > When it runs it gives the following error:
> >
> > SQLServerException: The server failed to resume the transaction. Desc:
> > and then one of the following error codes -
> > 3800000001
> > 3b00000001
> > 4000000001
> >
> > Auto commit is off and there is no transaction being initiated on the Java
> > side. When I run SQL profiler the only transaction being created is the one
> > inside the procedure.
> >
> > If I remove the transaction management code from the proc then everything
> > works.
> >
> > Has anyone seen this before or know how to fix it? I have a test harness if
> > anyone is interested.
> >
> > Regards,
> >
> > Scott
>


I'm getting a similar error message. My application loops over 100,000 rows
and calls a stored procedure to insert the rows into a database. auto commit
is set to false on my connection and the stored procedure doesn't have any
transaction calls.

I'm preparing a CallableStatement at the start of the loop and I'm reusing
it for all 100,000 rows. I call conn.commit() every N rows.

I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException with the
message:
The server failed to resume the transaction. Desc:3a00000001.

This same code is working with other MySQL and Oracle databases except on
those platforms I'm using PreparedStatements and SQL instead of stored
procedures. Any ideas? the earlier suggestion of closing the statement for
every row would drastically reduce performance.
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Evan T. Basalik (MSFT)

External


Since: Nov 21, 2006
Posts: 24



(Msg. 7) Posted: Tue Jun 17, 2008 8:43 pm
Post subject: Re: SQLServerException: The server failed to resume the transactio [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Are you doing transaction management in your stored procedure?

Can you post your stored procedure defintion, plus your JDBC code?

Evan
--------------------
>Thread-Topic: SQLServerException: The server failed to resume the transactio
>thread-index: AcjP+EuoWF3JB8PDSoWVuiWRN/h5aw==
>X-WBNR-Posting-Host: 207.46.19.197
>From: =?Utf-8?B?VG9tIEdyYW50?=
>References: <affb3a2c-ddd5-4a28-b249-d9565a1451d4
@m1g2000pre.googlegroups.com>
>Subject: Re: SQLServerException: The server failed to resume the transactio
>Date: Mon, 16 Jun 2008 14:31:10 -0700
>Lines: 56
>Message-ID:
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:526
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>
>
>
>"joeNOSPAM@bea.com" wrote:
>
>> On Apr 6, 11:22 pm, Scott Berry
>> wrote:
>> > Hi All,
>> >
>> > I have a block of code that does the following:
>> >
>> > 1. Call Stored Procedure A which internally:
>> > a. Opens a transaction
>> > b. Does work
>> > c. Closes the transaction
>> > 2. Calls Stored Procedure B
>> >
>> > When it runs it gives the following error:
>> >
>> > SQLServerException: The server failed to resume the transaction. Desc:
>> > and then one of the following error codes -
>> > 3800000001
>> > 3b00000001
>> > 4000000001
>> >
>> > Auto commit is off and there is no transaction being initiated on the Java
>> > side. When I run SQL profiler the only transaction being created is the one
>> > inside the procedure.
>> >
>> > If I remove the transaction management code from the proc then everything
>> > works.
>> >
>> > Has anyone seen this before or know how to fix it? I have a test harness if
>> > anyone is interested.
>> >
>> > Regards,
>> >
>> > Scott
>>
>
>
>I'm getting a similar error message. My application loops over 100,000 rows
>and calls a stored procedure to insert the rows into a database. auto commit
>is set to false on my connection and the stored procedure doesn't have any
>transaction calls.
>
>I'm preparing a CallableStatement at the start of the loop and I'm reusing
>it for all 100,000 rows. I call conn.commit() every N rows.
>
>I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException with the
>message:
>The server failed to resume the transaction. Desc:3a00000001.
>
>This same code is working with other MySQL and Oracle databases except on
>those platforms I'm using PreparedStatements and SQL instead of stored
>procedures. Any ideas? the earlier suggestion of closing the statement for
>every row would drastically reduce performance.
>

Evan T. Basalik
This posting is provided “AS IS” with no warranties, and confers no rights.
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Pete Lefebvre

External


Since: Aug 15, 2008
Posts: 1



(Msg. 8) Posted: Fri Aug 15, 2008 9:36 am
Post subject: Re: SQLServerException: The server failed to resume the transaction [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Evan -

We are running into a similar issue. Transaction management is being done
in stored procedures. Autocommit is true.

We're seeing that when calling stored procedures in sequence (separate
connections), if the sps have transaction management code included and the
first SP throws an exception (of any kind), the next SP call will fail with
the "server failed to resume the transaction" message. If the transaction
management code is removed, the error is not thrown. Other drivers (jTDS,
IBM) do not appear to exhibit this behaviour. Are transactions within SPs
supported?

1. Call SP1
a. Open transaction
b. Rollback transaction due to error
2. Handle exception
3. Call SP2

Database product name : Microsoft SQL Server
Database product version : 9.00.3239
JDBC driver name : Microsoft SQL Server 2005 JDBC Driver
JDBC driver version : 1.2.2828.203

Thanks in advance for your assistance,
Pete

"Evan T. Basalik (MSFT)" wrote:

> Are you doing transaction management in your stored procedure?
>
> Can you post your stored procedure defintion, plus your JDBC code?
>
> Evan
> --------------------
> >Thread-Topic: SQLServerException: The server failed to resume the transactio
> >thread-index: AcjP+EuoWF3JB8PDSoWVuiWRN/h5aw==
> >X-WBNR-Posting-Host: 207.46.19.197
> >From: =?Utf-8?B?VG9tIEdyYW50?=
> >References: <affb3a2c-ddd5-4a28-b249-d9565a1451d4
> @m1g2000pre.googlegroups.com>
> >Subject: Re: SQLServerException: The server failed to resume the transactio
> >Date: Mon, 16 Jun 2008 14:31:10 -0700
> >Lines: 56
> >Message-ID:
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
> >Path: TK2MSFTNGHUB02.phx.gbl
> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:526
> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> >
> >
> >
> >"joeNOSPAM@bea.com" wrote:
> >
> >> On Apr 6, 11:22 pm, Scott Berry
> >> wrote:
> >> > Hi All,
> >> >
> >> > I have a block of code that does the following:
> >> >
> >> > 1. Call Stored Procedure A which internally:
> >> > a. Opens a transaction
> >> > b. Does work
> >> > c. Closes the transaction
> >> > 2. Calls Stored Procedure B
> >> >
> >> > When it runs it gives the following error:
> >> >
> >> > SQLServerException: The server failed to resume the transaction. Desc:
> >> > and then one of the following error codes -
> >> > 3800000001
> >> > 3b00000001
> >> > 4000000001
> >> >
> >> > Auto commit is off and there is no transaction being initiated on the Java
> >> > side. When I run SQL profiler the only transaction being created is the one
> >> > inside the procedure.
> >> >
> >> > If I remove the transaction management code from the proc then everything
> >> > works.
> >> >
> >> > Has anyone seen this before or know how to fix it? I have a test harness if
> >> > anyone is interested.
> >> >
> >> > Regards,
> >> >
> >> > Scott
> >>
> >
> >
> >I'm getting a similar error message. My application loops over 100,000 rows
> >and calls a stored procedure to insert the rows into a database. auto commit
> >is set to false on my connection and the stored procedure doesn't have any
> >transaction calls.
> >
> >I'm preparing a CallableStatement at the start of the loop and I'm reusing
> >it for all 100,000 rows. I call conn.commit() every N rows.
> >
> >I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException with the
> >message:
> >The server failed to resume the transaction. Desc:3a00000001.
> >
> >This same code is working with other MySQL and Oracle databases except on
> >those platforms I'm using PreparedStatements and SQL instead of stored
> >procedures. Any ideas? the earlier suggestion of closing the statement for
> >every row would drastically reduce performance.
> >
>
> Evan T. Basalik
> This posting is provided “AS IS” with no warranties, and confers no rights.
>
>
>
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
joe.weinstein

External


Since: Feb 02, 2008
Posts: 15



(Msg. 9) Posted: Fri Aug 15, 2008 12:37 pm
Post subject: Re: SQLServerException: The server failed to resume the transaction [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 15, 9:36 am, Pete Lefebvre <Pete
Lefeb....RemoveThis@discussions.microsoft.com> wrote:
> Evan -
>
> We are running into a similar issue. Transaction management is being done
> in stored procedures. Autocommit is true.
>
> We're seeing that when calling stored procedures in sequence (separate
> connections), if the sps have transaction management code included and the
> first SP throws an exception (of any kind), the next SP call will fail with
> the "server failed to resume the transaction" message. If the transaction
> management code is removed, the error is not thrown. Other drivers (jTDS,
> IBM) do not appear to exhibit this behaviour. Are transactions within SPs
> supported?
>
> 1. Call SP1
> a. Open transaction
> b. Rollback transaction due to error
> 2. Handle exception
> 3. Call SP2


So the SP1 does a "begin transaction" and then fails, (presumably
without
calling rollback?)
Then your code calls setAutoCommit(false),
then calls conn.rollback()
then calls SP2, which tries to do a "begin transaction" and fails?

Fundamentally, it will be a mess that the coders have to
manage if there are transactions being defined at different
levels in the stack...
Joe Weinstein at Oracle
 >> Stay informed about: SQLServerException: The server failed to resume the transa.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SQLServerException - I am getting a SQLServerException:The statement must be executed before any results can be obtained. The statement must be executed before any results can be obtained. randomly when doing an insert of a table and needing back the IDENTITY field. It..

com.microsoft.sqlserver.jdbc.SQLServerException: Invalid O.. - we are trying to fetch records using the select statement from the SQL Server 2005 Server using the jdbc driver 1.2 . but when the batch is executed, getting the error ".com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name"....

SQL Server JDBC with SQL Server cluster - Hi Does anyone know if there are problems or difficulties when accessing a SQL Server with cluster, using JDBC? In fact, I didn't have any problems yet, but we are preparing an environment where such a connection will be needed. Thanks!

Which Jdbc for SQL Server 2000? - I thought I asked this question before, but I can't find it in the list so I'm trying again. I'm developing an application on Java JDSE 1.5 for Windows from Sun Microsystems. I need to connect and interact with an MS SQL Server 2000. Who's JDBC package...

I can not connect to SQL Server 2000 on WinXP SP2 - Hi, I am using 'SQLServer 2000 Driver for JDBC' in my java application. My SQL Server is running in Windows XP pc. I dont had any problem before install WindowsXP Service Pack 2. But when i have installed WinXP SP2 my application can not connected to..
   Database Help (Home) -> JDBC Driver All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]