<?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>惜分飞 &#187; ORA-01012</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-01012/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 22 Oct 2026 15:45:06 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>ORA-01012: not logged on</title>
		<link>https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html</link>
		<comments>https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html#comments</comments>
		<pubDate>Thu, 04 Aug 2011 12:24:31 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORA-xxxxx]]></category>
		<category><![CDATA[ORA-01012]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=1351</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html" target="_blank">ORA-01012: not logged on</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>今天接到现场反馈，数据库出现ORA-01012: not logged on错误提示，这个问题上次也出现过一次，当时按照网上说的方法，直接重启数据库了，问题解决了，同时也导致因为数据库重启，现场破坏，而alert日志中无任何异常信息，所以不知从何处下手分析。这次我上数据库准备查看时，发现数据库已经正常，监控也显示正常，说明数据库已经恢复正常。从此我推理这个问题应该是外部因素导致，而不是数据库本身的bug，从而决定要找出该问题的原因来。有个重要的因素，该数据库是我几个月前因为undo损坏做过恢复的，查看相关参数，发现processes是默认值150，是不是该值导致的不敢肯定，因为一般process超了会报ORA-00020错误，而这次只有ORA-01012。但是心中还是没有底，总感觉这个的可能性最大，于是想通过试验来证实下自己的想法<br />
<strong> 1、数据库版本（10g结果相同）</strong><br />
SQL&gt; select * from v$version where rownum=1;</p>
<p>BANNER<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Oracle9i Enterprise Edition Release 9.2.0.4.0 &#8211; Production</p>
<p><strong>2、创建pfile，修改processes，重启数据库，查看processes值</strong><br />
SQL&gt;  select name,value from v$parameter where name=&#8217;processes&#8217;;</p>
<p>NAME                 VALUE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
processes            30</p>
<p><strong>3、查看系统processes数量</strong><br />
SQL&gt; select count(*) from v$process;</p>
<p>COUNT(*)<br />
&#8212;&#8212;&#8212;-<br />
13</p>
<p><strong>4、添加数据库连接数（为了增加process数目）</strong><br />
[oracle@localhost ~]$ sqlplus chf/xifenfei</p>
<p>SQL*Plus: Release 9.2.0.4.0 &#8211; Production on Wed Jul 27 23:11:50 2011</p>
<p>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</p>
<p>Connected to:<br />
Oracle9i Enterprise Edition Release 9.2.0.4.0 &#8211; Production<br />
With the Partitioning, OLAP and Oracle Data Mining options<br />
JServer Release 9.2.0.4.0 &#8211; Production</p>
<p>SQL&gt; !</p>
<p><strong>5、重复3和4，发现当process数量为29时出现激动人心一幕</strong><br />
5.1)继续访问数据库<br />
[oracle@localhost ~]$ sqlplus system/xifenfei</p>
<p>SQL*Plus: Release 9.2.0.4.0 &#8211; Production on Wed Jul 27 23:12:06 2011</p>
<p>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</p>
<p>ERROR:<br />
<span style="color: #ff0000;"> ORA-00020: maximum number of processes (%s) exceeded</span></p>
<p>Enter user-name:</p>
<p>5.2)使用其他用户访问<br />
[oracle@localhost ~]$ sqlplus /nolog</p>
<p>SQL*Plus: Release 9.2.0.4.0 &#8211; Production on Wed Jul 27 23:12:49 2011</p>
<p>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</p>
<p>SQL&gt; conn / as sysdba<br />
<span style="color: #ff0000;"> Connected to an idle instance.</span><br />
SQL&gt; select * from dual;<br />
select * from dual<br />
*<br />
ERROR at line 1:<br />
<span style="color: #ff0000;"> ORA-01012: not logged on</span></p>
<p>SQL&gt; conn chf/xifenfei<br />
ERROR:<br />
<span style="color: #ff0000;"> ORA-00020: maximum number of processes (%s) exceeded</span></p>
<p>[oracle@localhost ~]$ sqlplus &#8220;/ as sysdba&#8221;</p>
<p>SQL*Plus: Release 9.2.0.4.0 &#8211; Production on Wed Jul 27 23:29:52 2011</p>
<p>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</p>
<p><span style="color: #ff0000;">Connected.</span><br />
SQL&gt; select * from dual;<br />
select * from dual<br />
*<br />
ERROR at line 1:<br />
<span style="color: #ff0000;"> ORA-01012: not logged on</span><br />
现象说明：<br />
1)终于发现了ORA-01012错误，期待了很久。<span style="color: #ff0000;">发现只有当sys登录系统，对数据库进行查询或者操作之时才会出现ORA-01012，其他用户只要一登录数据库就会提示ORA-00020错误。</span></p>
<p>2)当process达到数据库最大限时，sysdba登录系统是也显示不正常<br />
2.1）当使用sqlplus &#8220;/ as sysdba&#8221;登录时，缺少：<br />
Connected to:<br />
Oracle9i Enterprise Edition Release 9.2.0.4.0 &#8211; Production<br />
With the Partitioning, OLAP and Oracle Data Mining options<br />
JServer Release 9.2.0.4.0 &#8211; Production<br />
2.2）当使用conn / as sysdba登录时，提示为：<br />
Connected to an idle instance.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/04/oracle-awr%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">ORACLE AWR使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/1749.html" rel="bookmark" class="crp_title">Oracle 10.2.0.x升级到11.2.0.3</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/ora-00845-memory_target-not-supported-on-this-system-2.html" rel="bookmark" class="crp_title">ORA-00845: MEMORY_TARGET not supported on this system</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/10/oracle%e4%b8%adconnect-by-start-with-%e7%9a%84%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">Oracle中connect by…start with…的使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/%e5%9d%97%e4%bf%ae%e6%94%b9%e8%b7%9f%e8%b8%aa%e7%89%b9%e6%80%a7block-change-tracking.html" rel="bookmark" class="crp_title">块修改跟踪特性(Block Change Tracking)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/10/sp2-1503-sp2-0152-%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">SP2-1503   SP2-0152  错误解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/08/bbed%e7%a0%b4%e5%9d%8f%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6.html" rel="bookmark" class="crp_title">bbed破坏数据文件</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/disableenable-oracle-database-vault.html" rel="bookmark" class="crp_title">Disable/Enable Oracle Database Vault</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/linux%e4%b9%8bpmap%e5%91%bd%e4%bb%a4.html" rel="bookmark" class="crp_title">Linux之pmap命令</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/%e5%90%8c%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%9a%e7%89%88%e6%9c%ac%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9b%91%e5%90%ac%e9%85%8d%e7%bd%ae.html" rel="bookmark" class="crp_title">同台服务器多版本数据库监听配置</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/warning-inbound-connection-timed-out-ora-3136.html" rel="bookmark" class="crp_title">WARNING: inbound connection timed out (ORA-3136)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/oracle%e7%9b%91%e5%90%ac%e8%ae%be%e7%bd%ae%e5%af%86%e7%a0%81.html" rel="bookmark" class="crp_title">Oracle监听设置密码</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2011/08/ora-01012-not-logged-on.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
