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 last published in July 2004

Dig Deeper on Using Oracle PL-SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close