sqlplusscott/tigerSQL*Plus:Release10.1.0.4.0-ProductiononThuSep615:43:552007Copy" />

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

ORA-12560: TNS:protocol adapter error(TNS:協

系統 1720 0
這種問題一般是因為客戶端不知道要連那個instance或者不知道要使用哪個TNS Alias

可能的原因1.服務沒有起來
下邊是Tom的一個Test Case來說明OracleServiceSID服務沒有起來的話,是會引起ORA-12560錯誤的。
        C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:43:55 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

scott%ORA10GR1> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\tkyte>net stop oracleserviceora10gr1
The OracleServiceORA10GR1 service is stopping.........
The OracleServiceORA10GR1 service was stopped successfully.


C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:44:35 2007

Copyright (c) 1982, 2005, 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:\Documents and Settings\tkyte>net start oracleserviceora10gr1
The OracleServiceORA10GR1 service is starting..........
The OracleServiceORA10GR1 service was started successfully.


C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:45:12 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

scott%ORA10GR1>
        
        
      
修改方法:控制面板>管理工具>服務里邊把 OracleServiceSID起起來

    
可能的原因2.ORACLE_SID環境變量沒有指定(最常見引起ORA-12560問題的原因)
檢查方法,命令行(cmd)下,
C:\Documents and Settings\ptian>set oracle_sid
ORACLE_SID=test
ORACLE_SID是sqlplus默認連接的數據庫instance,即sqlplus user/pwd連接的instance,如果不指定sqlplus里連接的時候就需要明確@你的instance,eg,sqlplus user/pwd@instance.
修改方法:在注冊表中,HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1\ORACLE_SID 需指向你的Instance(eg.orcl);或者在系統的環境變量里加ORACLE_SID項,值為Instance的SID。

可能的原因3.TNS_ADMIN環境變量沒有指定
檢查方法,命令行(cmd)下,
C:\Documents and Settings\ptian>set TNS_ADMIN
TNS_ADMIN=D:\oracle\product\10.1.0\Db_1\NETWORK\ADMIN
TNS_ADMIN應該返回你的tnsnames.ora所在的目錄
修改方法:可以在注冊表HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\TNS_ADMIN或者環境變量中指定。

可能的原因4.ORACLE_HOME環境變量沒有指定
和上邊的方法類似,檢查Oracle_Home環境變量

可能的原因5.tnsnames.ora文件內容不對
A sample:
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ptian-cn.cn.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)

Possible fixes for the TNS-12560 include:
ORA-12560: TNS:protocol adapter error(TNS:協議適配器錯誤)

轉載請注明出處: http://blog.csdn.net/pan_tian/article/details/7699469

======EOF======

ORA-12560: TNS:protocol adapter error(TNS:協議適配器錯誤)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 五月婷婷综合色 | 亚洲悠悠色综合中文字幕 | 天天操你| 成人性视频免费网站 | 免费大片黄在线观看yw | 国产精品视频在 | 日本伊人精品一区二区三区 | 国产一区二区三区精品视频 | 日本精高清区一 | 色就色综合 | 天天色天天操天天射 | 国产亚洲欧美一区二区三区 | 国产精品极品 | 精品国产一二三区 | 99热在线获取最新地址 | 女性一级全黄生活片 | 亚洲综合专区 | 国产福利视频奶水在线 | 精品的一区二区三区 | 黄页在线播放网址 | 久久精品国产乱子伦多人 | 2020亚洲欧美日韩在线观看 | 国产精品永久免费10000 | 亚洲欧美在线精品一区二区 | 狠狠亚洲婷婷综合色香五 | 久久精品国产亚洲麻豆小说 | 六月婷婷久香在线视频 | 日韩性生活视频 | 久久综合视频网 | 九九毛片 | 老司机午夜在线 | 日日干夜夜艹 | 欧美3区 | 性a爱片免费视频性 | 亚洲乱淫 | 中国jizz日本 | 日本一区二区三区久久 | 亚洲欧美日韩一级特黄在线 | 国产1区2区三区不卡 | 综合亚洲一区二区三区 | 精品中文字幕一区二区三区四区 |