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

  • Home
  • SEARCH
  • 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 9081881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:25:22+00:00 2026-06-16T20:25:22+00:00

I used the following code: –begin tran redist1 /*–FIRST Update update db..tablename set column=value

  • 0

I used the following code:

--begin tran redist1
/*--FIRST Update
update db..tablename set column=value
where complexthing = othercomplexthing
*/
/*--SECOND Update
update db..tablename set column=replace(column,'A','1')
*/
select * from db..tablename
--rollback tran redist1
--commit tran redist1

I highlighted “begin tran redist1”, ran it, highlighted the FIRST update statement and ran it, then did the same with the select statement. It worked, so I highlighted “commit tran redist1”.

Next I highlighted “begin tran redist1”, ran it, highlighted the SECOND update statement and ran it, then did the same with the select statement. It did not work, so I highlighted “rollback tran redist1”.

Next I highlighted “begin tran redist1”, ran it, highlighted the SECOND update statement and ran it, then did the same with the select statement. It worked this time, so I highlighted “commit tran redist1”.

I used several more update statements, repeating this process each time. I then opened an “edit” window to change values directly after my last “commit”, but SQL server kept timing out for that window alone, saying my “commit tran redist1” was the blocking transaction, despite having completed. I ran the commit again, and the edit window opened, showing the data as I had changed it.

This morning, I opened up the edit window again, and the table was somehow back to just after I ran the FIRST query + commit. All later queries + commits were lost. The record I edited manually in the edit window was still edited, however.

Note that each time, I used the name “redist1”, ending with a commit or a rollback as appropriate for each transaction. My question is, was the reuse of the name the cause of my problem? Does the reuse of the name create a conflict of some type?

  • 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-06-16T20:25:23+00:00Added an answer on June 16, 2026 at 8:25 pm

    BEGIN TRAN doesn’t require any name – the name is optional.

    Transactions, however, can be nested and if you did not complete the first one, it will still be in effect even after the others have completed – if you roll it back, they will all roll back.

    What probably happened is that you did not commit a transaction, so the following transactions were nested. When the transaction rolled back (possibly due to a timeout), they all rolled back.

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

Sidebar

Related Questions

I used following code to encrypt the NSString value with Key, NSString *token =
I want to set file length to zero. i used following code try {
Need your help. I am trying it first time. I have used following code.
I used following code in my main activity for android app but username value
I used following code, but it displays only 2 digit of ISO country name.
I have used following code to convert string to json and parse it. String
i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I have used following code to create a simple PDF file. It executes fine
I am trying to used following code but I am not getting good performance
I've used following code snippet for my activity in order to deal with orientation

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.