Q

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.

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
This Content Component encountered an error

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close