Solved

Transactions in Sql Server stored procedures

Posted on 2014-10-15
3
154 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell GUI pull downs populated by MS SQL table 2 35
SSIS On fail action 5 37
SQL Activity Monitor detail 2 23
sql server query 12 23
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

791 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