程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> 登錄RMAN報ORA-12162:TNS:netservicenameisincorrectlyspecified錯誤

登錄RMAN報ORA-12162:TNS:netservicenameisincorrectlyspecified錯誤

編輯:Oracle教程

登錄RMAN 報ORA-12162:TNS:net service name is incorrectly specified錯誤

[oracle@localhost admin]$ date
Tue Apr 22 18:06:16 CST 2014
[oracle@localhost admin]$ rman target /
//出現詭異的ora-12162錯誤,第一反應是TNS,但第二反應告訴我,這是個簡單的錯誤,注意環境變量

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Apr 22 18:08:11 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12162: TNS:net service name is incorrectly specified
[oracle@localhost admin]$ echo $ORACLE_HOME //查看ORACLE_HOME,設置正確
/u01/app/oracle/product/11.2.0/db_1
[oracle@localhost admin]$ echo $ORACLE_SID //查看ORACLE_SID,發現設置為空

[oracle@localhost ~]$ export ORACLE_SID=PROD //手工注入ORACLE_SID
[oracle@localhost ~]$ rman target / //啟動RMAN,成功

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Apr 22 18:13:40 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: PROD (DBID=239015079)

RMAN>

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved