请各位帮忙看下,啥原因哈
本机安装了oracle11g服务端,64位;oracle11g客户端 32位。
pl/sql 连的数据库,net 测试也没问题,但是就是导入导出数据库不行,报错ORA-12154: TNS: 无法解析指定的连接标识符
tnsnames.ora 文件:
# tnsnames.ora Network Configuration File: D:\Oracle\OracleData\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ZHANG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
SYD_GS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.150)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = fm360)
)
)
====================================================================
listener.ora 文件:
# listener.ora Network Configuration File: D:\Oracle\OracleData\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Oracle\OracleData\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = D:\Oracle\OracleData\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = zhang-PC)(PORT = 1521))
)
)
===============================================
用sqlplus @orcl连接也会报错
用sqlplus fzcq/fzcq as sysdba 连接是正常
如果先用
>set oracle_sid=orcl
>imp fzcq/fzcq file=E:\fzcq.dmp ignore=y fromuser = fzcq touser = fzcq statistics=none
这样就可以了导入
被这个问题搞的都没脾气了,各位帮忙看看啥原因,谢谢啦!
--友情转载