Hi ESquared - yes I did see your latest suggestion thanks. That was going to be next on my list to try when I get a chance... not sure what our DBAs attitude is to sql jobs but as with all of this investigation it's a case of findingany options and then seeing if any are practical to implement...
Hi Denny,
I had tried that but must have got the syntax wrong - tried it again and no longer get that error msg I showed above. However I do get the "User does not have permission to use the KILL statement." error, even though inside my dbo.KillProcess sproc I have WITH EXECUTE AS 'dbo'. So...
ESquared - it doesnt appear to work on Win2K. I suspect the reason why is what is says in BOL about the rights for the KILL command "not being transferrable" with required membership of the processadmin or sysadmin roles.
From my testing it appears exactly the same under 2005 as well. Although...
Denny,
That sounds very interesting and exactly what I am after.
Would you mind elaborating a little on how this could work? I apologise as not being a DBA or having used 2005 I dont know it's security model all that well. Are you saying it would be possible to create a "KillProcess" sproc...
Hi Paul,
To date we have done as you say and not allowed such functionality. However all it takes is a couple of screens being abused by users or a poorly indexed table by developers to bring a production app to it's knees.
As for "contact the dba" - if only it were that easy mate. We have so...
We are trying to find a way that we can get our DBAs to agree to that will allow us to KILL long running queries from our application code.
In the dev environment life is relatively easy - you can execute a KILL against the spid of your session as we have dbo rights.
However in UAT/production...
Why do you have a form in your ActiveX .ocx project - is the form instantiated by the UserControl? If so, why not pass a 'Me' type object reference from the User Control to the form just after you instantiate it?
ie...inside your usercontrol..
Dim oFrm as MyForm
set oFrm = new MyForm...
Paste this API declaration at top of module:
Private Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetCurrentNTLogin() As String
On Error GoTo ErrGetCurrentNTLogin
Dim...
Writing an add-in for personal interest which finds some text in the current project etc and highlights it for the user.
My problem is that the VBIDE.CodePane.Show method does not 'activate' the window if it is already displayed. What this then means is that if I do an oCodePane.SetSelection...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.