重庆思庄Oracle、Redhat认证学习论坛

标题: 登录RMAN 报ORA-12162:TNS:net service name is incorrectly specified错误 [打印本页]

作者: jiawang    时间: 2019-3-13 11:14
标题: 登录RMAN 报ORA-12162:TNS:net service name is incorrectly specified错误
oracle@localhost admin]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 22 18:08:11 2018
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=orcl   //手工注入ORACLE_SID

[oracle@localhost ~]$ rman target /             //启动RMAN,成功
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 22 18:13:40 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved
connected to target database: PROD (DBID=239015079)

RMAN>







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2