Home » RDBMS Server » Networking and Gateways » ORA-12154: TNS:could not resolve the connect identifier..
ORA-12154: TNS:could not resolve the connect identifier.. [message #459781] Tue, 08 June 2010 05:43 Go to next message
beginner88
Messages: 45
Registered: June 2010
Member
Hello
I am using oracle 10g , when i try to connect from oracle Forms ,
"scott/tiger@orcl"

Then following error messge occurs

ORA-12154: TNS:could not resolve the connect identifier specified.


i format My HD reinstall oracle but the problem is still exists .
I am working on stand alone PC .

Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459787 is a reply to message #459781] Tue, 08 June 2010 05:58 Go to previous messageGo to next message
Michel Cadot
Messages: 59427
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12154: TNS:could 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 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 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.

You don't need listener and remote connection to connect a local database.

Regards
Michel

[Updated on: Tue, 08 June 2010 05:58]

Report message to a moderator

Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459898 is a reply to message #459787] Tue, 08 June 2010 16:11 Go to previous messageGo to next message
Littlefoot
Messages: 19697
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that you might benefit from the TNS_ADMIN environment variable.
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459923 is a reply to message #459781] Wed, 09 June 2010 01:00 Go to previous messageGo to next message
beginner88
Messages: 45
Registered: June 2010
Member
thanks for the reply Smile
i also read the given topic ,it was really helpful .
First of all i copied one of the tns_admin file and paste it into 0_library folder , and rename else tns_admin files , then i issue following command



C:\>set tns_admin=C:\0_library

C:\>set tns_admin
tns_admin=C:\0_library


but the problem is still there , and its not working Sad

This is My TNS_ADMIN file ..

# tnsnames.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kirmani)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )


Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459929 is a reply to message #459923] Wed, 09 June 2010 01:16 Go to previous messageGo to next message
Littlefoot
Messages: 19697
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is the connection string you use (at least, that's what you posted in the first message):
scott/tiger@orcl
  • scott = username
  • tiger = password
  • orcl = database alias. Its name is derived from the TNSNAMES.ORA file (try to use this name; it is not TNS_ADMIN file, as you said in your last message)
On the other hand, you said that TNSNAMES.ORA contains a database whose alias is "EXTPROC_CONNECTION_DATA". See the difference? ORCL <> EXTPROC_CONNECTION_DATA.

Either try to connect using "scott/tiger@extproc_connection_data", or rename the database in TNSNAMES.ORA file (or create another alias for the same) and try again with "scott/tiger@orcl".

This is how TNSNAMES.ORA might look like:
ORCL, EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kirmani)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459954 is a reply to message #459781] Wed, 09 June 2010 02:50 Go to previous messageGo to next message
beginner88
Messages: 45
Registered: June 2010
Member
Thanks for the reply

This is my Oracle database TNSNAMES file

# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = kirmani)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )


And its my DevSuiteHome TNSNAME file


# tnsnames.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kirmani)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PLSExtProc)
    )
  )




I copy DevSuiteHome Tnsnames file and paste it on 0_library folder , and try each
scott/tiger@EXTPROC_CONNECTION_DATA
scott/tiger@PLSExtProc


but nothing works ..
and if i remove 0_library folder and rename DevSuite and oracle_home tnsnames files to their original names then follwoing command is working fine for me from Oracle_HOME SQL Prompt
scott/tiger@orcl
but still it gives me error message either i try to connect from DevSuite sql Prompt or Oracle Froms



Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #459994 is a reply to message #459954] Wed, 09 June 2010 05:29 Go to previous messageGo to next message
Littlefoot
Messages: 19697
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In a case (your case too) that someone installed several Oracle products on his/her computer, there are as many TNSNAMES.ORA files as there are Oracle products. Two in your case.

Every time you add a new database to one of them, you have to do that same with another (and another, and another ...) TNSNAMES.ORA file because - you'll probably want to connect to that database from all tools you use.

Now: why would you want to do that? Why wouldn't you maintain a single TNSNAMES.ORA file instead? That's why you have to create a TNS_ADMIN environment variable which will point Oracle tools to that TNSNAMES.ORA file. It can be placed anywhere you want, just remember which one it is.

If you set it right, there should be no problem.

However, the truth is different. People have serious problems making it work. I can't tell why is that so. Perhaps, trying this and trying that brings too much confusion. Try to start over - forget what you did and what you think you did. Go from the first step onwards, step by step. It *must* work. It works for millions of us. It *will* work for you. Hopefully.
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460497 is a reply to message #459781] Fri, 11 June 2010 09:07 Go to previous messageGo to next message
beginner88
Messages: 45
Registered: June 2010
Member
Thanks again for your reply Smile
I tried it again and again but it did not work for me Sad .
Thats why i format my HD and install oracle once again , but this time i install Oracle forms only , so now i have only one TNSNAMES File.
Here it is ,

# tnsnames.ora Network Configuration File: C:\DevSuiteHome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kirmani)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PLSExtProc)
    )
  )



but problem is still there, and now when i am trying to connect from scott/tiger it is giving me error .
ORA-12560: TNS:protocol adapter error


Regards .
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460498 is a reply to message #460497] Fri, 11 June 2010 09:12 Go to previous messageGo to next message
BlackSwan
Messages: 22911
Registered: January 2009
Senior Member
>Thats why i format my HD and install oracle once again , but this time i install Oracle forms only , so now i have only one TNSNAMES
What is OS name & version? What version of FORMS installed?
on which system/hostname (OS name & version) is Oracle RDBMS installed (which Oracle version to 4 decimal places)
post results from following command

SET

[Updated on: Fri, 11 June 2010 09:12]

Report message to a moderator

Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460500 is a reply to message #459781] Fri, 11 June 2010 09:27 Go to previous messageGo to next message
beginner88
Messages: 45
Registered: June 2010
Member
Windows XP SP3
Oracle Forms 10g

C:\Documents and Settings\Administrator>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KIRMANI
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\KIRMANI
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\DevSuiteHome_1\jdk\jre\bin\classic;C:\DevSuiteHome_1\jdk\jre\bin;C:\De
uiteHome_1\jdk\jre\bin\client;C:\DevSuiteHome_1\jlib;C:\DevSuiteHome_1\bin;C:\
vSuiteHome_1\jre\1.4.2\bin\client;C:\DevSuiteHome_1\jre\1.4.2\bin;C:\WINDOWS\s
tem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0605
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
USERDOMAIN=KIRMANI
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460502 is a reply to message #460500] Fri, 11 June 2010 09:34 Go to previous messageGo to next message
BlackSwan
Messages: 22911
Registered: January 2009
Senior Member
on which system/hostname (OS name & version) is Oracle RDBMS installed (which Oracle version to 4 decimal places)
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460513 is a reply to message #460502] Fri, 11 June 2010 10:34 Go to previous messageGo to next message
Littlefoot
Messages: 19697
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Now you have a hoe, but the field is missing.

In other words: do you have a database available? If you are at home (or using a standalone PC, not connected to any (database) server), you have Forms Developer, but - you have to have a database Forms will connect to.

So - do you have a database? We know it is not on your PC. Somewhere on the network, perhaps? If so, you'll have to add its alias into your TNSNAMES.ORA file.
Re: ORA-12154: TNS:could not resolve the connect identifier.. [message #460686 is a reply to message #459781] Mon, 14 June 2010 03:38 Go to previous message
beginner88
Messages: 45
Registered: June 2010
Member
Thanks everyone for help and especially Littlefoot .
My database is now working fine :)Smile
This Is my Tnsnames file
dbserver =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )


and i am connecting with scott/tiger@dbserver .

Regards
Previous Topic: ORA-12154: TNS:could not resolve the connect identifier specified
Next Topic: Message gateway
Goto Forum:
  


Current Time: Fri Oct 24 18:27:07 CDT 2014

Total time taken to generate the page: 0.08201 seconds