<?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-12560</title>
	<atom:link href="https://www.xifenfei.com/tag/ora-12560/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>Sun, 22 Nov 2026 15:21:14 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>sqlplus版本不正确，导致ORA-12560</title>
		<link>https://www.xifenfei.com/2012/02/sqlplus%e7%89%88%e6%9c%ac%e4%b8%8d%e6%ad%a3%e7%a1%ae%ef%bc%8c%e5%af%bc%e8%87%b4ora-12560.html</link>
		<comments>https://www.xifenfei.com/2012/02/sqlplus%e7%89%88%e6%9c%ac%e4%b8%8d%e6%ad%a3%e7%a1%ae%ef%bc%8c%e5%af%bc%e8%87%b4ora-12560.html#comments</comments>
		<pubDate>Wed, 15 Feb 2012 01:53:23 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[ORA-xxxxx]]></category>
		<category><![CDATA[ORA-12560]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=2525</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2012/02/sqlplus%e7%89%88%e6%9c%ac%e4%b8%8d%e6%ad%a3%e7%a1%ae%ef%bc%8c%e5%af%bc%e8%87%b4ora-12560.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/2012/02/sqlplus%e7%89%88%e6%9c%ac%e4%b8%8d%e6%ad%a3%e7%a1%ae%ef%bc%8c%e5%af%bc%e8%87%b4ora-12560.html" target="_blank">sqlplus版本不正确，导致ORA-12560</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>sqlplus登录数据库报ORA-12560</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XIFENFEI&gt;sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Feb 14 23:33:31 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:\Users\XIFENFEI&gt;sqlplus -v

SQL*Plus: Release 11.2.0.2.0 Production
</pre>
<p>在这里发现sqlplus的版本信息不正确，我的数据库安装的11.2.0.1，这么怎么显示sqlplus是11.2.0.2，然后进入%ORACLE_HOME%/bin目录下面执行sqlplus，登录成功</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XIFENFEI&gt;cd e:\oracle\11_2_0\BIN

e:\oracle\11_2_0\BIN&gt;sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 2月 14 23:44:38 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL&gt;
</pre>
<p>出现了这样的问题，考虑应该是环境变量设置不当导致，查看环境变量发现下面一部分</p>
<pre class="brush: bash; title: ; notranslate">
E:\oracle\timesten\bin;E:\oracle\timesten\ttoracle_home\instantclient_11_2;e:\oracle\11_2_0\bin;
</pre>
<p>问题的答案就是在这里，因为我的电脑是先安装Oracle，前几天安装了TimesTen，导致环境变量发生了改变，使得我在默认情况下使用sqlplus的时候，自动调用了TimesTen中的sqlplus导致</p>
<pre class="brush: bash; title: ; notranslate">
C:\Users\XIFENFEI&gt;cd E:\oracle\timesten\ttoracle_home\instantclient_11_2

E:\oracle\timesten\ttoracle_home\instantclient_11_2&gt;dir sqlplus*
 驱动器 E 中的卷没有标签。
 卷的序列号是 38D0-2A35

 E:\oracle\timesten\ttoracle_home\instantclient_11_2 的目录

2010/11/19  00:50           655,360 sqlplus.exe
2011/11/08  04:12            84,524 sqlplus.sym
2011/11/08  04:12               554 SQLPLUS_README
               3 个文件        740,438 字节
               0 个目录  9,825,832,960 可用字节
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/linuxwin%e4%b8%adoracle_sid%e9%94%99%e8%af%af%e6%97%b6%e8%a1%a8%e7%8e%b0.html" rel="bookmark" class="crp_title">Linux/Win中ORACLE_SID错误时表现</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/sqlnet-authentication_services%e5%8f%82%e6%95%b0%e8%af%b4%e6%98%8e.html" rel="bookmark" class="crp_title">SQLNET.AUTHENTICATION_SERVICES参数说明</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%aeasm.html" rel="bookmark" class="crp_title">远程访问ASM</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/timesten%e5%91%bd%e4%bb%a4%e2%80%94ttrestore.html" rel="bookmark" class="crp_title">TimesTen命令—ttrestore</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/data-pump-%e4%b8%adnetwork_link%e5%8f%82%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8%e7%bb%ad%e7%99%bb%e5%bd%95%e7%94%a8%e6%88%b7%e5%92%8c%e6%ba%90%e7%ab%af%e7%94%a8%e6%88%b7%e4%b8%8d%e4%b8%80%e8%87%b4.html" rel="bookmark" class="crp_title">Data pump 中network_link参数的使用续(登录用户和源端用户不一致处理)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/easy-connect-naming-method%e4%b8%8eezconnect%e5%85%b3%e7%b3%bb.html" rel="bookmark" class="crp_title">Easy Connect Naming Method与EZCONNECT关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/data-pump-%e4%b8%adnetwork_link%e5%8f%82%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">Data pump 中network_link参数的使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/commit%e5%90%8elob%e5%ad%97%e6%ae%b5%e4%bd%bf%e7%94%a8%e4%b8%b4%e6%97%b6%e8%a1%a8%e7%a9%ba%e9%97%b4%e6%9c%aa%e9%87%8a%e6%94%be.html" rel="bookmark" class="crp_title">commit后lob字段使用临时表空间未释放</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/10/sys%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81%e5%90%ab-sqlplus%e7%99%bb%e5%bd%95%e6%95%b0%e6%8d%ae%e5%ba%93%e8%af%a1%e5%bc%82%e4%ba%8b%e4%bb%b6%e5%88%86%e6%9e%90.html" rel="bookmark" class="crp_title">sys用户密码含$ sqlplus登录数据库诡异事件分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/11/ora-12547-tnslost-contact.html" rel="bookmark" class="crp_title">ORA-12547: TNS:lost contact故障一例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/01/%e4%bd%bf%e7%94%a8dblink%e5%af%bc%e8%87%b4scn%e5%8f%91%e7%8e%b0%e6%94%b9%e5%8f%98.html" rel="bookmark" class="crp_title">使用dblink导致scn发现改变</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/vpwfile_users%e5%92%8c%e5%af%86%e7%a0%81%e6%96%87%e4%bb%b6%e5%85%b3%e7%b3%bb.html" rel="bookmark" class="crp_title">V$PWFILE_USERS和密码文件关系</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2012/02/sqlplus%e7%89%88%e6%9c%ac%e4%b8%8d%e6%ad%a3%e7%a1%ae%ef%bc%8c%e5%af%bc%e8%87%b4ora-12560.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
