sp_who2 'Active' and hanging tasks issue  sql server

Posted on 2006-03-20
Last Modified: 2008-02-01

the stored procedure sp_who2 'Active' shows me hanging tasks in SQL,thus if I find a hanging taks,how can I kill the task via script form?

is this possible?

Question by:rutgermons
    LVL 23

    Expert Comment

    Hi rutgermons,

    use Kill {id}

    the Id being the ID shown in sp_who2


    Kill 15


    Author Comment

    so I can run this from the query analyzer?
    LVL 23

    Accepted Solution

    Yep, however you might have a problem killing a process logged in as the same user that started it, if this is the case create another Login and kill it that way, but for now try it in Query Analyser.

    It might take some time to rollback if its a large process, so keep an eye

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction If you are not already aware of what you could use a table with sequential integer values for in SQL, you can read Delimited String Parsing in SQL Server 2005 or later ( by BrandonGalderisi (h…
    Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now