Ora-12154 Sqlplus Error
Contents |
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any tns could not resolve service name sqlplus questions you might have Meta Discuss the workings and policies of
Tnsping Works But Sqlplus Does Not Ora-12514
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring ora-12154 tnsping works sqlplus fails developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site ora-12154 tns listener does not currently know of service requested in connect descriptor for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Sql*Plus ERROR: ORA-12154: TNS:could
Ora-12154 Tns Could Not Resolve Service Name
not resolve the connect identifier specified up vote 3 down vote favorite I installed Sql*PLUS on a cloud Oracle Linux Environment in order to access an remote database. I used the installation instructions provided as an answer here: http://stackoverflow.com/questions/23488394/how-to-install-sql-plus-client-in-linux My connection string is correct, but I get the error ERROR: ORA-12154: TNS:could not resolve the connect identifier specified I tried resolving this issue by attempting to looking at my tnsnames.ora, but it did not exist and the path connected to my $ORACLE_HOME did not have the subfolders "/network/admin/". In order to resolve this, I created both folders and created a tnsnames.ora file in the new admin/ containing my connection string. Unfortunately, I still get the same error. The path to my new tnsnames.ora file being: /usr/lib/oracle/11.2/client64/network/admin/tnsnames.ora For reference my connection string is structured the following way: (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST= asdasdasd.com)(PORT=1524)) (CONNECT_DATA = (SID = AARCER1) ) ) And my command I am putting into my terminal is: sqlplus "userName/myPassword@(DESCRIPTION=(ADDRES
TNS:received bad packet type from network layer Cause: Internal error. Action: Not normally visible to the user. For further details, turn on tracing and reexecute the operation. If error persists, contact Worldwide Customer Support. ORA-12152: TNS:unable to send break message Cause: Unable ora-12154 tns could not resolve the connect identifier specified windows 7 to send break message. Connection probably disconnected. Action: Reestablish connection. If the error is persistent, tns could not resolve the connect identifier specified oracle 10g turn on tracing and reexecute the operation. ORA-12153: TNS:not connected Cause: Not currently connected to a remote host. Action: Reestablish connection. ORA-12154: TNS:could
Sqlnet.ora Example
not resolve the connect identifier specified Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the http://dba.stackexchange.com/questions/95698/sqlplus-error-ora-12154-tnscould-not-resolve-the-connect-identifier-specifie naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached. Action: - If you are using local naming (TNSNAMES.ORA file): - Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA) - Verify that https://docs.oracle.com/cd/B19306_01/server.102/b14219/net12150.htm a TNSNAMES.ORA file exists and is in the proper directory and is accessible. - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file. - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable. - If you are using directory naming: - Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Verify that the LDAP directory server is up and that it is accessible. - Verify that the net service name or database name used as the connect identifier is configured in the directory. - Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier - If you are using easy connect naming: - Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Make sure the host, port and service name specified are correct. - Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming. ORA-12155: TNS:received bad datatype in NSWMARKER packet Caus
to friend sqlplus error ORA-12154: TNS:could not resolve the connect identifier specified [message #444874] Wed, 24 February 2010 10:43 http://www.orafaq.com/forum/t/155441/ sandrino82 Messages: 6Registered: February 2010 Junior Member Hi everyone, i'm having some trouble trying to connect the db via sqlplus. it seems to me that the http://www.cyberciti.biz/faq/linux-oracle-error-ora-12154-tnscould-solution/ file tnsnames.ora is not read when i execute sqlplus. whit the command: sqlplus username/password@servicename i receive the error ORA-12154, while if i pass the whole connection tns could string i can connect without problems sqlplus username/password@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oradev10)(PORT = 10520))(CONNECT_DATA = (SERVICE_NAME = D10))) i set the ORACLE_HOME environment variable correctly... what more i have to do? following is my tnsnames.ora TOTEMPROD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = tns could not ttf19.cern.ch)(PORT = 1521)) ) (CONNECT_DATA = (SID = totemdb) ) ) TOTEM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oradev10.cern.ch)(PORT = 10520)) ) (CONNECT_DATA = (SERVICE_NAME = D10) ) ) my SQLNET.ora is: SQLNET.AUTHENTICATION_SERVICES = (NTS) NAMES.DIRECTORY_PATH= (HOSTNAME,TNSNAMES,ONAMES) any help will be very appreciated Regards Report message to a moderator Re: sqlplus error ORA-12154: TNS:could not resolve the connect identifier specified [message #444875 is a reply to message #444874] Wed, 24 February 2010 10:46 cookiemonster Messages: 12341Registered: September 2008 Location: Rainy Manchester Senior Member Do you have more than 1 oracle home? Report message to a moderator Re: sqlplus error ORA-12154: TNS:could not resolve the connect identifier specified [message #444877 is a reply to message #444875] Wed, 24 February 2010 10:51 sandrino82 Messages: 6Registered: February 2010 Junior Member No, i have only 1 ORACLE_HOME. if i run from cmd prompt echo %ORACLE_HOME% i get C:\oracle\product\10.2.0\client
May 1, 2008inDebian / Ubuntu,Linux,RedHat and Friends,Suse,Troubleshooting,Ubuntu LinuxQ. 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-hostnameMake 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.oraMake 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.oraMy 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 -nIf everything else failed try to trace problem by running strace:$ su - oracle
$ strace -o /tmp/debug.sqlplus sqlplus user/password Share this tutorial on:TwitterFacebookGoogle+Download PDF version Found an error/typo on this page?About the author: Vivek Gite is a seasoned sysadmin and a trainer for the Linux/Unix & shell scripting. Follow him on Twitter. OR read more like this:How Do I Start Oracle Service in UNIX or Linux?Linux Start Oracle As a ServiceHow do I enable SQL *Plus Up and down arrow keys?Ubuntu Linux Install Oracle Database XE ServerOracle lsnrctl: error while loading shared libraries:…Ubuntu Linux Remove Oracle Express EditionHowTo: Use Oracle / MySQL SQL Commands In UNI