<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechnoBlogy &#187; killing</title>
	<atom:link href="http://technoblogy.net/tag/killing/feed/" rel="self" type="application/rss+xml" />
	<link>http://technoblogy.net</link>
	<description>Technology with a Big difference</description>
	<lastBuildDate>Mon, 05 Dec 2011 17:29:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Killing Locked Sessions in Oracle</title>
		<link>http://technoblogy.net/killing-locked-sessions-in-oracle/</link>
		<comments>http://technoblogy.net/killing-locked-sessions-in-oracle/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:34:55 +0000</pubDate>
		<dc:creator>Nauman</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[killing]]></category>
		<category><![CDATA[locked session]]></category>

		<guid isPermaLink="false">http://technoblogy.net/killing-locked-sessions-in-oracle/</guid>
		<description><![CDATA[Many a times user sessions are locked in some DML/DDL operation, than how to unlock those sessions because a new step or operation could not be done on the specific object that is locked. Some really easy steps to unlock an object or kill a session in oracle are as follows: To view locked sessions [...]]]></description>
			<content:encoded><![CDATA[<p>Many a times user sessions are locked in some DML/DDL operation, than how to unlock those sessions because a new step or operation could not be done on the specific object that is locked.</p>
<p>Some really easy steps to unlock an object or kill a session in oracle are as follows:</p>
<p>To view locked sessions in oracle:</p>
<blockquote><blockquote>
<p>select oracle_username,object_id,session_id from v$locked_object;</p>
<p>ORACLE_USERNAME OBJECT_ID SESSION_ID        <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-         <br />Lock_1 321876 130         <br />Lock_2 320431 130         <br />Lock_3 320429 130</p>
</blockquote>
</blockquote>
<p>Now checking the object that are locked, and that are not accessible:</p>
<blockquote><p>select object_name from dba_objects where object_id = 321876;      <br />OBJECT_NAME       <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       <br />Table_1</p>
</blockquote>
<p>Now you know which object is being locked and what is the object id whole session is to be killed.</p>
<p>First retrieve the serial# of object ID:</p>
<blockquote><p>select sid,serial# from v$session where sid=130;      <br />SID SERIAL#       <br />&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-       <br />130 8655</p>
</blockquote>
<p>Now killing this session:</p>
<blockquote><p>alter system kill session &#8217;130,8655&#8242;;      <br />System altered.</p>
</blockquote>
<p>Now you can check by executing the first query again to see whether the locked session is still locked or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://technoblogy.net/killing-locked-sessions-in-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

