.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Transaction failed to rollback

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :Sql Server

I have a client which is running SQL 2005 Express on a Windows 2003 box. The system is very much barebones with extremely small storage space (10GB total!)

The other day I had done a column modification for them on one of their larger tables. Unknowingly, I was up against their threshold for diskspace and was unable to complete the transaction. I received the following:

Could not allocate space for object 'dbo.Tmp_jobresumes' in database '###' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Thereafter, the the table could not be found. Neither the original table name nor the tmp table name.This is a huge issue as I found out that they also do not have a backup of the database where I could start to restore our log files up until the point of failure.

I'm in a major pinch because the tables contains all of their assets for candidates (they are a staffing firm) over the past 7 years and I cannot seem to figure out how best to retrieve this information - in part due to the fact that I am reluctant to make any moves (i.e. restarting server, etc.) as I do not want to loose any change of recovery unless I know the implications fully. I know that the data is st

View Complete Post

More Related Resource Links

Doesn't restart sql server rollback uncommitted transaction?

hi, i executed a long-running sql in the management studio. The sql updates many rows and all updates are within a transaction. After runing 30 mins, the hard disk is full. That's because of the uncommitted updates. Then, i restarted the sql server because I thought after restarting, the uncommitted transaction is rollback and the occupied hard disk space is also released. But i found that the transaction is rollbacked but the hard disk space is not released. Why the hard disk space is not released? how can i release the disk space now? Thank you for your help.

Rollback Transaction or Rollback Work

Hi all, I run a delete statement,  but it deleted wrong rows that I need in my table. I didn't start with begin transaction statement, is there a way to bring these data back using any Rollback statement or any other ways? Thank you.  

Implementing Transaction in SSIS Package - [Execute SQL Task] Error: Failed to acquire connection "<

I have a simple SSIS package with three "Execute SQL Tasks". I am using ADO.Net Connection to execute SPs on a DB server. When I execute this package It works fine. So far so good. Now, I need to implement transation on this package. And problem starts now onwards. When I try to execute package after setting TransationOption = Required for the Sequence container which contains all the tasks, I get following error. [Execute SQL Task] Error: Failed to acquire connection "NYCDB0008.Export". Connection may not be configured correctly or you may not have the right permissions on this connection. "NYCDB0008.Export" is the name of the ADO.Net connection. I have been hunting for any solution but all in vain. I have tried changing all DTC settings on the dev as well as Database server. Please respond if anyone has any solution. Thanks! Anand

The server failed to resume the transaction. Desc:4800000002


Hi friends !

I have a problem with SQL Server 2008. When I insert / update into DB then exception is thrown:

   The server failed to resume the transaction. Desc:4800000002

Pls help me solve this problem.

Thank u


transaction does not rollback


I've just had a real WTF moment, so I'll try not to be too incoherent...

I have a transaction coded up to do inserts in header/detail tables.  I nested everything in a transaction, thinking that if there was a problem, the transaction would rollback and, while it would commit my new data, it would nevertheless leave the database in a consistent state.  But it seems to not have worked...

Here's the transaction:

		DECLARE	@DeliveryPointID	INT				= 1,
				@TrailerID			INT				= NULL,
				@LoadPercent		DECIMAL(8, 4)	= 100.0
		INSERT INTO dbo.Slips (DeliveryPointID, GrowerContractID, TrailerID, PackRequestID, GrossWeight, LoadPercent, ReceivedDate, VarietyID, Notes)
		VALUES (@DeliveryPointID, @ContractID, @TrailerID, @PackRequestID, @GrossWeight, @LoadPercent, @ReceivedDate, @VarietyID, @Notes)
		SELECT @SlipID = 

The function START: has failed. No transaction cookie was returned


I am inconsistently getting following excepiton while running the application with JDBC2 driver. This exception is specially seen when mutiple threads of application are running.

An unexpected exception has occurred while trying to create report with roster id 2.
Hibernate operation: could not insert: [com.core.processing.impl.model.TempResource]; uncategorized SQLException for SQL [insert into RESOURCE_REGISTER (RR_DATABASE, RR_OWNER_ID, RR_RESOURCE_NAME, RR_RESOURCE_TYPE, RR_RUN_ID) values (?, ?, ?, ?, ?)]; SQL state [null]; error code [0]; error enlisting a JdbcConnectionHandle of a JdbcPooledConnection from datasource metadata1 in state ACCESSIBLE wrapping SQLServerXAConnection:1 on  ProxyConnectionID:1; nested exception is java.sql.SQLException: error enlisting a JdbcConnectionHandle of a JdbcPooledConnection from datasource metadata1 in state ACCESSIBLE wrapping SQLServerXAConnection:1 on  ProxyConnectionID:1
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator translate 83
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator translate 80
org.springframework.orm.hibernate3.HibernateAccessor convertJdbcAccessException 424
org.springframework.orm.hibernate3.HibernateAccessor convertHibernateAccessException 410

How to rollback transaction in wcf method if CommunicationException occured?



I have a simple wcf-service (wsHttpBinding) hosted in IIS which inserts data into database and returns number of inserted records and collection of errors (such as foreign key problems while inserting the data).

int ProcessCustomers(Customer[] customers, out ErrorLog[] errorLog)
This is a implementation:
public int ProcessCustomers(Customer[] customers, out ErrorLog[] errorLog)
 using (var tran = new TransactionScope())
 //insert data into database
 return cnt;

 And i have a very simple wcf-client which invokes this method and trying to catch exceptions.

 int inserted = client.ProcessCustomer(customers, out errorLogs);
catch (TimeException timeEx)
 //write to log
catch (FaultException faultEx)
 //write to log
catch (CommunicationException commEx)
 //write to log
catch (Exception ex)
 //write to log

//close the proxy

Nested transactions, rollback causes error "Transaction count after EXECUTE indicates that a COMMIT



I have a stored proc that does something that requires a transaction, and so I've put in the begin tran, commit, and rollback on error logic in it. That works as expected. But what if I now want to use the proc in the context of a larger transaction, such as calling it multiple times or doing other things as part of the same transaction? This seems impossible to achieve without either raising an error (throwing an exception) or having SQL Server do so on my behalf, rather unhelpfully.

For instance, I wanted to test a proc and reckoned a simple way to do so would be to start a transaction, execute the procedure, and roll back the transaction if the procedure didn't abort it:

begin transaction 
exec someProc
if XACT_STATE() = 1 rollback

This works if someProc doesn't encounter any errors (so it begins and commits a transaction and the transaction count is 1 at entry and exit of the proc), but crashes and burns if the procedure rolls back the transaction, producing SQL error

Msg 266, Level 16, State 2, Procedure ExecuteImport, Line 0
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.

I don't understand why that is. To my mind, it is perfectly normal that the transaction count can go from any level at entry to ze

Rollback transaction for calling web services


Dear all,


I have the web form whcih processing several web services calls.

If one call failed, it will rollback transactions. But it cannot.

Due to the web services will complete for each call.

I am using sql connection and sql command.

Is it possible to do this??? 

Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing



We have Sharepoint 2007 SP1 databases on SQL Server 2005 SP3 x64. Users are uploading and viewing the documents with NO issues but we are frequently getting the below error in share point logs:

08/01/2010 08:21:33.11  w3wp.exe (0x0DA4)                        0x2168 Windows SharePoint Services    Database                       6f8g Unexpected Unexpected query execution failure, error code 266. Additional error information from SQL Server is included below. "Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1." Query text (if available): "DECLARE @@S uniqueidentifier; DECLARE @@DocId uniqueidentifier; DECLARE @@Level tinyint; DECLARE @@DocUIVersion int; DECLARE @@DoclibRowId int; DECLARE @@iRet int;DECLARE @DN nvarchar(256); DECLARE @LN nvarchar(128); DECLARE @FU nvarchar(260); SET @@Level=2 SET @@DocUIVersion =1 SET @@DocId='9FA36FDF-00FF-4810-92CE-A5ED5671A0C9' SET @@S='6780CE0A-2C92-463D-B86D-D8ACBB72E065'; EXEC @@DoclibRowId = proc_GenerateNextId 'C145E0B3-9F7C-4E0F-9644-7DB0AEE53EDF','1E9F697F-4032

Transaction log backup job failed suddenly




We are using SQL Server 2000. There is a maintenance plan to backup three databases on a daily basis (full-backup) and their transactional log every 4 hours.

All the jobs have been running well, however, since last 3 days the transactional log backup job has been failing for one of the three databases. Transactional logs are stored on same location on disk. 


I checked to confirm that there is enough space on the disk. Performed DBCC command on the database and that returned 0 errors.


I noticed the following errors:

From SQL server log:



From Database Maintenance Plan History:

“[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3241: [Microsoft][ODBC SQL Server Driver][SQL Server]The media family on device 'H:\XXXXXXXXXXXXXXXX.TRN' is incorrectly formed. SQL Server cannot process this media family. [Microsoft][ODBC SQL Server Driver][SQL Server]BACKUP LOG is terminating abnormally”

Any help would be greatly appreciated. I've been a developer and now have to take c

SQL Server Database Transaction

A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

WebMatrix conversion failed when converting from a character string to uniqueidentifier?


I am trying to retrieve xml from a small function in my .cshtml page. Its throwing me an error. This however, runs fine in a console/form environment.

It takes 3 parameters and 1 exception.

myDll.GetXML(year, username, uniqueidentifier, out ex);

When I run this page I get the error, "Conversion failed when converting from a character string to uniqueidentifier."

Or a stack of.

System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting from a character string to uniqueidentifier.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBeha

Failed to create AppDomain


Recently updated my system to use Visual Studio 2010, and projects will no longer compile. All of them give the error "Failed to create AppDomain." Intellisense does not work either (except for standard HTML tags), and individual pages will also not compile.

Points of note:

  • All sites are hosted on UNC shares (although it doesn't work on a new site created on local drive either)
  • Language is mostly C#
  • No explicit code is creating AppDomain objects
  • Sites compiled fine under both VS 2005 and 2008 both before and after VS 2010 installation
  • Sites compile and run fine from the IIS server on the remote machines (one IIS 6, one IIS 7)

Things I've tried (some obviously shouldn't have any bearing on it, but I've tried just about everything that anyone suggested on any forum I could find, most of which seemed to apply to IIS, not VS):

  • renaming/deleting security.config
  • running caspol -reset
  • re-registering asp.net: aspnet_regiis.exe -ua / aspnet_regiis.exe -i
  • removing VS 2005, 2008, 2010, and then re-installing just VS 2010
  • adding the UNC path to the local intranet zone (internet options control panel)
  • adding the UNC path to LocalIntranet_Zone in the ASP.Net 2.0 control panel (runtime security policy/machine/al

helped needed: ASP LDAP authentication failed in IE 8


I use the following code to do the user authentication through Active Directory using LDAP.

entry = new DirectoryEntry("LDAP://" + server, user_name, password);
if (!string.IsNullOrEmpty(entry.Name))
EmployeeNetId = entry.Username.Substring(0, 3);

// Retrieve EmployeeId, and Employee Full Name
EmployeeId = -1;

It works for Chrome, Firefox with no problem. But with IE 8, it works sometimes, and failed on some computers. When it failed, I figured that I need to check SSL 2.0 in IE 8 Internet Options.  It's weird because in those computers that IE 8 works, SSL 2.0 is also unchecked.

Am I using some deprecated method? Or How do I specifiy the SSL version options in the LDAP connection?

Multiple web methods in one transaction


Hi everyone

Sorry I am kinda new in web services, so it may sound a bit newbish question.

We have a web service that comunicates with the database and exposes web methods that enables the application to access the database. Each method does only one operation (Insert, Update or Delete). What I need to do is create a transaction that will be consisted of multiple calls to the database, meaning multiple calls of more then one web methods. Can I do that? (I read that if the web method does not throw exception - or ContextUtil.SetAbort() is not called - the transaction will be commited automatically when the web method finishes executing, which I don't want to happen because I want to call another web method in the same transaction, and then manually commit the transaction)

Thank you in advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend