Solved

Transactions in Sql Server stored procedures

Posted on 2014-10-15
3
153 Views
Last Modified: 2014-10-15
I know we have in transactions the following  statements

BEGIN Transaction

COMMIT
ROLLBACK

Do we have an END TRANSACTION statement?
I don't think so but I just to make sure there isn't any such statement
0
Comment
Question by:metro156
3 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 total points
ID: 40383254
>END TRANSACTION statement?  I
No ...
just commit and rollback
0
 

Author Comment

by:metro156
ID: 40383267
So you are saying the COMMIT or Rollback will always end the transaction???
0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 40383501
Yes.  COMMIT ends it by executing it, and ROLLBACK ends it by killing all actions between BEGIN and ROLLBACK.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSIS with VPN COnnection 2 78
date diff with Fiscal Calendar 4 33
Find SQL query used by application 3 20
physical_device_name field in SQL 3 3
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question