Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:48:07+00:00 2026-05-25T00:48:07+00:00

If I begin a transaction, but never get to call COMMIT. What happens to

  • 0

If I begin a transaction, but never get to call COMMIT. What happens to the data?
I have a smallish database (say a million or so SKU’s).. I am exporting it in small even numbered chunks of 1024.. (third party constraints limit my file size).
I have to flag the records that have been exported..

eg. Update products set exported = 1 where sku = ‘1234’;

Now every once and a while I have a problem that crashes the third party file writing tool.
But this happens before the file for the given record was created.

So I was thinking if I call begin transaction before I update the records, and commit only after I’ve confirmed the file was built.

This may result in a few begin transactions that don’t have their twin.

So two questions.. Is there a better way? (apart from getting rid of the buggy third party)
Or what happens to records that were part of a transaction that was never committed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:48:08+00:00Added an answer on May 25, 2026 at 12:48 am

    Your transactions stay open with the locks until the connection is fully closed (not just returning to the connection pool). This is bad

    To do an UPDATE without an explicit transaction and manage 1024-row chunks, do something like this

    UPDATE TOP (1024)
       Products
    SET
       exported = 1
    OUTPUT
       INSERTED.*
    WHERE
       exported = 0;
    

    You can modify this to use a status column that has “Processing” “Exported” etc so you know when stuff was read but not exported

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say a stored procedure on MSSQL Server uses an SQL transaction using BEGIN TRANSACTION/COMMIT
I have two PL/SQL Stored procedure each handling its own Transaction (Begin/Commit and Rollback
I've been using repositories for data access for some time now but have never
I have never used a Transaction, Commit and Rollback before and now I need
I have seen transaction usage in some cases but never really understood in which
Consider that I have a transaction: BEGIN TRANSACTION DECLARE MONEY @amount SELECT Amount AS
When I call the method session.begin transaction as follows: //session factory is instantiated via
Is it possible to use the SQL BEGIN TRANSACTION, COMMIT TRANSACTION, ROLLBACK TRANSACTION when
Given a database like this: BEGIN TRANSACTION; CREATE TABLE aTable ( a STRING, b
you have this procedure CREATE PROCEDURE dbo.test1 AS BEGIN begin transaction begin try exec

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.