I'm trying to export a database content to a dump file, so I'm doing the following:

[root@serverId TEST]# ps -ef|grep pmon|grep -v grep
oracle   25371     1  0 Sep29 ?        00:02:22 ora_pmon_SIDPA

[root@serverId TEST]# echo $ORACLE_HOME

[root@serverId TEST]# echo $ORACLE_SID

[root@serverId TEST]# echo $PATH

[root@serverId TEST]# exp userId@//serverId:1521/SIDPA FILE=dumpuserId.dmp LOG=dumpuserId.LOG OWNER=userId

Export: Release - Production on Wed Oct 21 09:10:56 2015

Copyright (c) 1982, 2005, 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

[root@serverId TEST]#

As you can see I already set the env vars $ORACLE_HOME and $ORACLE_SID as far as I understand correctly. I also set the PATH, so I think it should work but unfortunately, I does not.

Any comments about what to try will be welcomed.

Thanks in advance!

  • Try: exp userId@"//serverId:1521/SIDPA" FILE=dumpuserId.dmp LOG=dumpuserId.LOG OWNER=userId
    – Philᵀᴹ
    Commented Oct 21, 2015 at 7:46

1 Answer 1


The syntax should be exp username/password@instance , please also check if the listener is running ps -ef|grep tns and if it has the service listed lsnrctl services (the error "ORA-12154: TNS:could not resolve the connect identifier specified" points out that there is a problem related to that). You can also use the new tool expdp which in my opinion is more easy to use. Ex: expdp sys/password schema=userID dumpfile=userID.dmp directory=data_pump_dir logfile=userID_dmp.log . You can see where the data_pump_dir points to from sqlplus select * from dba_directories and even create your own directory CREATE DIRECTORY dmpdir AS '/opt/oracle'; and use it in the directory clause. But if you want to use exp, check the listener and also the syntax of your command.

  • @Phil: Finally what worked out it was to use the command: exp SYSTEM/manager FILE=dumpuserId.dmp LOG=dumpuserId.LOG OWNER=userId. Actually, I know it worked out but I do not know why? Can anybody let me know?
    – pafede2
    Commented Oct 21, 2015 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.