oracle數據庫導入問題--ORA-12560: TNS: 協議適配器錯誤

 

通過imp命令導入oralce數據庫備份的數據,
在cmd運行命令後,輸入
C:\>imp 帳號/密碼
Import: Release 10.1.0.2.0 - Production on 星期四 10月 25 17:57:04 2007

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


IMP-00058: 遇到 ORACLE 錯誤 12560
ORA-12560: TNS: 協議適配器錯誤
IMP-00000: 未成功終止導入

 (當前服務器上安裝多個數據庫實例時,直接imp,未指定具體實例)

     遇到這個問題後,很多人會認爲是本地服務名的原因,但經過測試,發現服務名是正常的。如果服務名和監聽文件的配置都是正確的,應該用以下方法解決;

 

解決辦法:
運行命令:
C:\>set Oracle_SID=實例名                 {linux用命令: export Oracle_SID=實例名}

C:\>imp fjtmap/123456

Import: Release 10.1.0.2.0 - Production on 星期四 10月 25 17:59:11 2007

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

 

如: 

方法1:

set oracle_sid=igrp

imp userid=yjjcdb/yjjcdb file='D:\yjjc.dmp'  fromuser=yjjcdb touser=yjjcdb  log='D:\import.log'

方法2:

imp userid=yjjcdb/yjjcdb@igrp_127.0.0.1  file='D:\yjjc.dmp'  fromuser=yjjcdb touser=yjjcdb  log='D:\import.log'

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章