oracle导出数据库报的错:EXP-00056 遇到 ORACLE 错误 12154

给新来的同事导数据库,
oracle配置文件如下:

# 本地数据库

ORCL_LOCAL =
  (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME= orcl)
    )
  )

cmd命令下,exp testutf1/testutf@orcl file=s:\ebs.dmp full = y
报错:
***EXP-00056 :遇到 ORACLE 错误 12154
ORA-12154: TNS :无法解析指定的连接标识符
EXP-00000:导出终止失败*

网上给出办法基本有三:
一、tnsnames.ora 文件中orcl实例名对应了多个ip地址,就是这种情况:

# 本地数据库

ORCL_LOCAL =
  (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME= orcl)
    )
  )
# 41数据库

ORCL_TEST_41 =
  (DESCRIPTION =

      (ADDRESS = (PROTOCOL =TCP )(HOST = 192.168.41.1)(PORT = 1521))

    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME= orcl41)
    )
  )

二、先set oracle_sid = orcl 再执行导出命令、
三、oracle服务没打开
window+R ->services.msc->打开服务管理界面、oracle的七个服务
oracle导出数据库报的错:EXP-00056 遇到 ORACLE 错误 12154_第1张图片
以上三个办法我都试了、不行
四、本机运行、不用加@orcl
连接远程服务器加@服务器名,
所以、直接exp testutf1/testutf file=s:\ebs.dmp full = y就搞定了

你可能感兴趣的:(oracle导出数据库报的错:EXP-00056 遇到 ORACLE 错误 12154)