Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 executing KILL statements progammatically

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-12 : 07:41:45
patrick writes "hi!

i'm quite new to this SQL thing. i am using vb.net in developing a web program.

i'm having difficulty executing the KILL statement programmatically from my vb code. i had successfully determined the users that are currently using the database but when i try to kill their process, i get an error message that my user id is not allowed to issue the KILL statement. how is this possible when in fact, i had already altered the properties of my user id to dbowner.

more so, as i have been browsing through a lot of resources, i have come across the MSDN help. it stated there that there are several cmd codes that MUST not be KILLed. i'm quite confused because when i try to look into the table, the cmd column all displays the codes which are not to be KILLed.

"AWAITING COMMAND";"CHECKPOINT SLEEP";"LAZY WRITER";"LOCK MONITOR";"SELECT";"SIGNAL HANDLER"

how is this possible? please help me, i really need you assistance.


thanks"

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-09-12 : 08:30:57
why would you want to do this?

====================================================
Regards,
Sean Roussy

"pimpin ain't easy, but someone has to do it" -- Pimpin Whitefolks(?)
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-09-12 : 10:56:10
From SQL Server Books Online:
"KILL permissions default to the members of the sysadmin and processadmin fixed database roles, and are not transferable."




CODO ERGO SUM
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-12 : 22:30:14
Take a revolver
Place one bullet in
Spin
Shoot foot
Spin
Shoot foot
Just keep repeating the sping/shoot foot thing

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-13 : 01:06:41
ROTFL

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -