[oracle@client1 dbbackup]$ exp file=/home/oracle/dbbackup/onlinecrm_09-05.dmp
Export: Release 10.2.0.4.0 - Production on 星期一 9月 5 15:28:20 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
EXP-00056: ORACLE error 12154 encountered
ORA-12154: TNS:could not resolve the connect identifier specified
EXP-00000: Export terminated unsuccessfully
[oracle@kuaishang ~]$ exp onlinecrm/ks@mydb file=/home/oracle/dbbackup/onlinecrm_09-05.dmp
Export: Release 10.2.0.1.0 - Production on Mon Sep 5 15:53:44 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
EXP-00056: ORACLE error 12170 encountered
ORA-12170: TNS:Connect timeout occurred
EXP-00000: Export terminated unsuccessfully
[oracle@client1 admin]$ tnsping mydb tnsping也不通
TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 05-9月 -2011 17:54:38
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
/usr/local/oracle/db_1/network/admin/sqlnet.ora
TNS-03505: Failed to resolve name
先确定安装目录下是有这两个文件
[oracle@client1 db_1]$ find /usr/local/oracle/db_1/ -name tnsnames.ora
/usr/local/oracle/db_1/network/admin/tnsnames.ora
[oracle@client1 db_1]$ find /usr/local/oracle/db_1/ -name listener.ora
/usr/local/oracle/db_1/network/admin/listener.ora
如果有请再查看tnsnames.ora这文件
[oracle@ku ~]$ vi /usr/local/oracle/db_1/network/admin/tnsnames.ora
ORCL10G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = kuaishang)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl10g)
)
)
发现在exp 和tnsnames.ora的SERVICE_NAME = orcl10g不同名,找不到才造成tns "Connect timeout occurred"
;所以把备份语句exp file=/home/oracle/dbbackup/onlinecrm_09-05.dmp
改成exp onlinecrm/ks@orcl10g file=/home/oracle/dbbackup/onlinecrm_09-05.dmp就可以