Q. My Oracle XE installation was working fine, but today I'm getting an error - which read as follows under Ubuntu Linux :
ORA-12154: TNS:could not resolve the connect identifier specified
How do I fix this problem without reinstalling Oracle?
A. Try following solutions:
Make sure DNS / host name resolution working fine
$ host oracle-server-ip
$ host oracle-server-hostname
Make sure /etc/resolv.conf and /etc/hosts and /etc/host.conf configured properly.
Make sure tnsnames.ora is configured properly:
Type the following command to login as oracle / dba user:
$ su - oracle
$ cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/
$ vi tnsnames.ora
Make sure hostname / IP is correctly defined and resolving perfectly:
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vivek-desktop)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)Make sure the host, port and service name specified are correct in listener.ora and above file:
$ cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/
$ vi listener.ora
My sample working file:
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = vivek-desktop)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)Make sure firewall is not blocking TCP ports:
$ sudo iptables -L -n
If everything else failed try to trace problem by running strace:
$ su - oracle
$ strace -o /tmp/debug.sqlplus sqlplus user/password
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 10 comments… read them below or add one }
Dear sir,
Thank you for send the every time latest infomation on linux based and also do me some help to me.
How do i install Oracle10g on RedHat Enterprises Linux 5 kindly send me the same with step by step.
Thanks & Regards,
Venu R,
IT Dept,
Avantha Technologies Ltd
Secunderabad.
Send me an email, i’ll send you complete step by step installation of Oracle 10g on Linux RHEL3, 4 , 5 , 6. Also its the same procedure to install 11g.
Ashwin Patel
this solution very useful to biggners to change listener.ora and tnsnames.ora file
to configure system
i have configure SDU and TDU configuration in tnsnames.ora and listener.ora
file to increase the network performance , but now iam getting error code 12154 while connecting through sqlplus…………. my all syntax for the above files are correct there is no any spell mistake.
please giude me.
manoj kulkarni
microstop infotech.
india.
So strange, it always reports an error which says TNS-12533 illegal address parameters
I have get the debugging file, but I don’t know how to analyse it.
Hi,
Even i did all modifications, getting same error…
Can you help me more in this issue ?
Thanks in advance
Suresh
i also have this problem. how to solve this problem.
$ su – oracle
$ cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/
$ vi tnsnames.ora
where to type these commands and how to check?
$ host oracle-server-ip
$ host oracle-server-hostname
where to type these command and how to check?
Clean some space on disk.