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 8221911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:05:58+00:00 2026-06-07T14:05:58+00:00

I use SQL Server 2008 SP3 (10.0.5500) And I have some Problems with Rollback

  • 0

I use SQL Server 2008 SP3 (10.0.5500) And I have some Problems with Rollback Transactions, at first I need to know something. This is My create Procedure script:

USE [MYDB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET XACT_ABORT ON
GO

If Exists(Select * From Sys.Objects Where [object_id]=Object_Id(N'[Members].[MyProc]') And ObjectProperty([object_id], N'IsProcedure') = 1)
Begin
Drop Procedure [Members].[MyProc]
Print 'Procedure [Members].[MyProc] Dropped!'
End
GO

CREATE PROCEDURE [Members].[MyProc](

 ....

)
AS 
BEGIN
    BEGIN TRANSACTION [MyProcCHK]
    ....
    COMMIT TRANSACTION [MyProcCHK]
END
GO

And After run this script, I check Procedure from: MyDB ->Programmability->StoredProcedures And Click to Modify [Members].[MyProc] Then this is the script shown:

USE [MYDB]
GO
/****** Object:  StoredProcedure ... ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [Members].[MyProc](

 ....

)
AS 
BEGIN
    BEGIN TRANSACTION [MyProcCHK]
    ....
    COMMIT TRANSACTION [MyProcCHK]
END
GO

So Where is SET XACT_ABORT ON? And why that not displayed here? As I have some problems with rollback transactions in stored procedures I think the SET XACT_ABORT ON never saved. Am I right? and if yes, what is the solution? I can’t use SET XACT_ABORT ON in stored procedures? or where is my fault?

  • 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-07T14:05:59+00:00Added an answer on June 7, 2026 at 2:05 pm

    You need to mention set xact_abort on inside the Create procedure statement

     CREATE PROCEDURE [Members].[MyProc](
     ........
    
     )
     AS
     SET XACT_ABORT ON
    BEGIN
    BEGIN TRANSACTION [MyProcCHK]
    ....
    COMMIT TRANSACTION [MyProcCHK]
    END
    GO
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use SQL server 2008 and I have created some tables. I want to
I use SQL Server 2008 R2 and have a table that I want no
I use SQL Server 2008 and have a table with 5 char typed columns.
I just started to use SQL Server 2008. I have a winforms application that
I have a view in SQL Server 2008 that I want to use for
I use SQL Server 2008, C#, I have a table which contains about 20000
I use SQL Server 2008 and Entity framework 4.1 database first approach . Is
We use SQL server 2008 as our RDBMS and we have a database that
I use SQL Server 2008. I need to DENY any delete operations on a
I have to use MS SQL Server 2008 to store data of PHP CAKE

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.