473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

deadlocks in sub-procedures - does the main procedure continue exiting

In SQL Server 2008 R2, I have a stored procedure X, which execs 2 other stored procedures:

create procedure X
begin
exec A
exec B
end

Stored procedure A has a transaction in it

SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
begin transaction
insert into .....
set @ReadingID = (select SCOPE_IDENTITY())
commit transaction

If stored procedure A fails with a deadlock, does stored procedure B get executed after the user has acknowledged the deadlock message, or is stored procedure X aborted?

I had expected X to be aborted, but my live data indicates that B may have been run after A has failed - or at least that's one explanation of the data - or at least the users description of what appeared to happen.
Sep 23 '13 #1
1 1261
Rabbit
12,516 Expert Mod 8TB
Sounds like you already answered your own question. If you want it to all to fail, then you need to code for it to look at the return value of A before running B.
Sep 23 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Scott Brady Drummonds | last post by:
Hi, everyone, I have a bug in a script of several hundred lines of code that I cannot figure out. I have attempted (unsuccessfully) to duplicate this problem in a smaller script that I can post...
0
by: - | last post by:
can anybody assist me with the following procedure? it can compile and works when i do any of the following: CALL ACTIVATE_ACCOUNT('') CALL ACTIVATE_ACCOUNT('123') but when i do a CALL...
4
by: marc | last post by:
I've been developing a stored procedure that uses a user defined function in the query portion of the procedure. However, since the end product needs to allow for dynamic table names, the UDF will...
2
by: pnp | last post by:
Hi all, I'm working on a win app that uses a logon form to verify the user that logs in the program and then hides the first form and displays an MDI form where the user does his work. The app is...
8
by: Rody Reulen | last post by:
I made an console application with Visual Basic .net. Visual Basic will automatically create the sub procedure main for you. I try to convert the main procedure to a function. During the...
1
by: Jon | last post by:
I have been reading the digital manual to find out how I can see the "main" procedure and I find this line under "Main Procedure" in the documentation: "Windows Forms applications run on their own....
3
by: gwainguard | last post by:
Hi from reading the ECMA spec. I know understand that the bracketed code after 'void Main' is an instruction that method Main accepts a string parameter array. Can someone explain to me why this...
2
by: Chris | last post by:
>From just about everything I have read, a DataReader reads only one record at a time from a database and only caches that one record in the client's memmory. However, a colleague of mine noted...
1
by: TC | last post by:
I'm confused about the proper way to shut down my application. I have a form which instantiates a control, which instantiates another control, which instantiates yet another control that runs a...
2
by: Samant.Trupti | last post by:
Hi, Does main function support unicode? int main( int argc, char** argv ) can I say int mainw( int argc, wchar_t** argv )? Thanks Trupti
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.