Seeing and killing currently running queries
How can I see what queries are currently running and how can I kill one of queries? I assume there is a risk in doing this, but sometimes we are desperate to get out of the 'Resource busy with acquire no wait...' etc.

    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

You will need access to V$ views, V$SESSION, V$PROCESSS, V$SQLAREA. Also, V$OPEN_CURSOR will have all currently opened cursors.

From V$SESSION you can get the SID and SERIAL#.

As a DBA, you can kill the session using the following command. Note: SID and SERIAL# values are separated by a comma and are within single quotes.

ALTER SYSTEM KILL SESSION 'SID, SERIAL#'


This was first published in July 2004

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.