---
title: "Application using KILL command to terminate DB Connection"  
description: "Application using KILL command to terminate DB Connection"  
author: "Anonymous User"  
published: 2015-06-19  
updated: 2015-06-19  
canonical: https://www.mindstick.com/forum/23304/application-using-kill-command-to-terminate-db-connection  
category: "android"  
tags: ["sql server 2008"]  
reading_time: 2 minutes  

---

# Application using KILL command to terminate DB Connection

I have made up my mind that this is not going to happen, but often being one of just a couple of DBAs in my shop I like to hear the [experiences](https://www.mindstick.com/articles/13062/designing-compelling-site-experiences-for-seo) of others.

We have a vendor stating they require processadmin role [membership](https://www.mindstick.com/interview/2228/in-which-database-is-the-information-such-as-membership-role-management-profile-and-web-parts-personalization-stored) so their app can KILL long running or user cancelled queries [against](https://yourviews.mindstick.com/view/81332/the-approach-of-science-against-disease-epidemics) their DB. In 10+ years I have never ran into this as a [requirement](https://yourviews.mindstick.com/view/85169/becoming-an-influencer-requirement-of-skills-and-knowledge) before. We currently house 400+ [databases](https://www.mindstick.com/startup/34/airbyte-the-open-source-platform-simplifying-data-integration-for-warehouses-lakes-and-databases) and none have users in the processadmin role. In my mind, even if the user cancels a given process within the app, the [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) code is [responsible](https://answers.mindstick.com/qa/94149/who-is-one-of-the-responsible-person-for-the-department-of-space-dos) for gracefully opening and closing the [connections](https://yourviews.mindstick.com/view/87707/baba-siddique-murder-news-his-connections-with-underworld) as needed. If a query is taking "too long" it needs to be tuned.

\
Depending on what is being KILLed, [rollback](https://www.mindstick.com/forum/157683/explain-commit-rollback-and-savepoint-statements-with-examples-in-pl-sql) could be quite burdensome and cause blocking. I would also be concerned they could easily kill the wrong [connection](https://www.mindstick.com/articles/13012/what-makes-ethernet-connection-better-than-wifi) in a shared environment.

Anyone else run into a situation like this? Anything obvious I am missing?

## Replies

### Reply by Anonymous User

I would not buy an application from a vendor like that, it is bound to be badly performing, badly designed and buggy. Anyone who is incompetent enough not to know that applications should not have admin rights is not someone I would buy a product from.If you are relying on KILL for handling long running queries which shouldn't be long running, then the T-SQL code definitely needs tuning. If these are ad-hoc SQL being sent to the engine from an on-the-fly query designer based on what the users select as their preferences from the application/web page, then the options being provided to the user needs to be looked at. I have never been an advocate of killing queries unless and until there is no other option. To resolve a production related outage (as a workaround or immediate solution), it might be acceptable at times but not as a practice.\
\


---

Original Source: https://www.mindstick.com/forum/23304/application-using-kill-command-to-terminate-db-connection

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
