<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>《使用IDLE_TIME注意事项》的评论</title>
	<atom:link href="https://www.xifenfei.com/2013/05/%e4%bd%bf%e7%94%a8idle_time%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9.html/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com/2013/05/%e4%bd%bf%e7%94%a8idle_time%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9.html</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 11 Dec 2025 02:46:14 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>作者：惜分飞</title>
		<link>https://www.xifenfei.com/2013/05/%e4%bd%bf%e7%94%a8idle_time%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9.html/comment-page-1#comment-1435</link>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
		<pubDate>Sat, 04 May 2013 17:06:27 +0000</pubDate>
		<guid isPermaLink="false">https://www.xifenfei.com/?p=4326#comment-1435</guid>
		<description><![CDATA[kill inactive script
[shell]
#!/bin/sh
tmpfile0=/tmp/.kill_inactive_0
tmpfile1=/tmp/.kill_inactive_1
tmpfile2=/tmp/.kill_inactive_2
sqlplus / as sysdba &lt;&lt;EOF
spool $tmpfile1
select &#039;kill time:&#039;&#124;&#124;to_char(sysdate,&#039;yyyy-mm-dd hh24:mi:ss&#039;) execute_time from dual;
select p.spid,s.sid,s.serial# from v\$process p,v\$session s
where s.paddr=p.addr
and s.status=&#039;INACTIVE&#039;;
spool off
EOF
cat $tmpfile1&gt;&gt;$tmpfile0
grep &quot;^[0123456789]&quot; $tmpfile1 &#124;awk &#039;{print $1}&#039;&gt;$tmpfile2
for x in `cat $tmpfile2`
do
kill -9 $x
done
rm $tmpfile1 $tmpfile2
[/shell]]]></description>
		<content:encoded><![CDATA[<p>kill inactive script</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
tmpfile0=/tmp/.kill_inactive_0
tmpfile1=/tmp/.kill_inactive_1
tmpfile2=/tmp/.kill_inactive_2
sqlplus / as sysdba &lt;&lt;EOF
spool $tmpfile1
select 'kill time:'||to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') execute_time from dual;
select p.spid,s.sid,s.serial# from v\$process p,v\$session s
where s.paddr=p.addr
and s.status='INACTIVE';
spool off
EOF
cat $tmpfile1&gt;&gt;$tmpfile0
grep &quot;^[0123456789]&quot; $tmpfile1 |awk '{print $1}'&gt;$tmpfile2
for x in `cat $tmpfile2`
do
kill -9 $x
done
rm $tmpfile1 $tmpfile2
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
