473,748 Members | 3,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stored procedures and CTRL+ALT+DEL

We have a suppliers application that runs a stored procedure (one of
many). This stored procedure then calls various other ones etc... and
the final number of stored procedures run is 11.

Now, some of our users have been having problems and deciding for
themselves to CTRL+ALT+DEL the application. This is the first thing we
will stop.

However, we have had some error messages indicating that the previous
transaction is blocking them when they try it again. This leaves the
user blocking themself. Guess what they do next ? ******* ! :-)

I'm assuming that SQL is stuck at some point in the 11 SP's used.

When you cancel a query or stored procedure and SQL rolls back the
transaction, it may take a while to do this. Fair enough, but how does
it handle it if multiple transactions are to be rolled back ? For
example.

A calls B which calls C

A gets cancelled. What happens to B and C ? (assuming A has finished
the call to B but not finished the remainder of the SP i.e B and/or C
are still running).

Is there any way I can identify where it has failed (bit of a long
shot I know)?

Does SQL take the users permissions when running stored procedures
from within other stored procedures, or does it use their permissions
for the first one and SQL Server handles the remainder ? I know the
first one will use the users permissions, but does this carry on
indefinately ?

Any advice / help would be appreciated.

Thanks

Ryan

p.s. SQL 7 running on Windows 2000 Server / Windows 2000 PC's.
Jul 20 '05 #1
1 2273
Ryan (ry********@hot mail.com) writes:
When you cancel a query or stored procedure and SQL rolls back the
transaction, it may take a while to do this. Fair enough, but how does
it handle it if multiple transactions are to be rolled back ? For
example.

A calls B which calls C

A gets cancelled. What happens to B and C ? (assuming A has finished
the call to B but not finished the remainder of the SP i.e B and/or C
are still running).
When you have nested transaction, all is in fact one big transaction.
The inner BEGIN and COMMIT TRANSACTION only increase and decrease a
transaction counter. When you ROLLBACK, you rollback to the outermost
BEGIN TRANSACTION.
Is there any way I can identify where it has failed (bit of a long
shot I know)?
With some SELECT with NOLOCK and knowledge about the procedures, you
might be able to dig out something.

But if the problem really is long-running ROLLBACK, you should see
this with sp_who or sp_who2. Another possibility is that when the
users press CTRL-ALT-DEL and close the application, that there is
some DLL or whatever which is still alive, so there is no rollback.
Does SQL take the users permissions when running stored procedures
from within other stored procedures, or does it use their permissions
for the first one and SQL Server handles the remainder ? I know the
first one will use the users permissions, but does this carry on
indefinately ?


If user A calls a procedure dbo.a_sp which calls dbo.b_sp, the all the
way in the procedures, the permissions to the objects are those of
dbo. Unless, that is, there is no dynamic SQL in the procedures. For
dynamic SQL, the user's own permissions apply.
--
Erland Sommarskog, Stockholm, so****@algonet. se
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9064
by: Pradeep M M | last post by:
Hi Folks, Can any of your folks tell me as to how can I capture the keys Ctrl+Alt+Del in C# or Vb.NET. Pradeep
1
2635
by: Pedro Graca | last post by:
Well ... I've been using Windows for a long time before I switched to Linux. I'm very used to type CTRL-ALT-DEL everytime I'm leaving my computer or arriving to it. It's hapenned _twice_ (in the last six months or so) for my Linux box. I want to be able to reboot my machine with CTRL-ALT-DEL, but I don't want to do it by mistake. So, I noticed /etc/inittab has these lines
3
44023
by: Stefan | last post by:
Hy, i have an app and i must disable this combination: ALT+F4; CTRL+ALT+DEL; CTRL+ESC;ALT+TAB like this: i find something on Internet and i can block ALT+F4 protected override System.Boolean ProcessCmdKey(ref System.Windows.Forms.Message msg,System.Windows.Forms.Keys keyData)
4
3585
by: | last post by:
I want to program a application for user login in windows.Now I has some question about disable the system hotkey(c+a+d,alt+tab,win key.etc.) and limit the mouse cursor in winform How can I do it? thanks!
7
6493
by: | last post by:
And how to lock the mouse? ths!
3
15366
by: Kevin Bilbee | last post by:
I need to know the API call to disable the CTRL-ALT-DEL in a C# windows form. We have created a time clock application to run on a tablet PC to replace the windows shell, we are going to hang it on a wall for associates to clock in and out and check their benefits. I will disable task manager from Domain Policies but I need to disable the CTRL-ALT-DEL and also be able to renable it from a special passworded menu for administrative...
2
2133
by: Mark Callaway | last post by:
Hello I'm trying to make a little windows service which blocks access to some other program, in order to prevent my childrens to play with some of my games. It works perfectly, but the weakest point, is that they can kill my service by using the task manager. That's why i would like to disable ctrl+alt+del.
3
1938
by: ranjithsubra | last post by:
Hi , i am a new member of this group,Learning vc++, 1.If i press Ctrl+Alt+Del, what happen Desktop window will be shoutdown, logof ,etc. 2. I need to Hide the KeyCombination CTRL+ALT+DEL, when i press the this Combination ,nothing going to be happen. Regs Ranjith Kumar.S
10
8580
by: thupham | last post by:
Dear all friend, I want disable Ctl+Alt+Del; Ctrl+Esc; Ctrl+tab, Alt+Tab, Start button, ctrl+Alt+Del, lock all keys on the keyboard. Have you ever do it in C#. Help me. Thanks for all reply.
0
9534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.