1 2 3 4 Previous Next 52 Replies Latest reply: Feb 13, 2013 12:51 AM by 936666 Go to original post RSS
      • 15. Re: TNS-03505: Failed to resolve name
        936666
        Sorry yes it is TNS_ADMIN only.
        • 16. Re: TNS-03505: Failed to resolve name
          Niket Kumar
          you need to check whether your tnsnames entry of database match with what you are showing example of tnsping command's database....
          • 17. Re: TNS-03505: Failed to resolve name
            yoonas
            Hi,

            Can you connect with ezconnect

            Can you connect this way?
            user/password@<ip/hostname>:1521/TESTDB

            What is the out put of lsnrctl at your database host

            Regards
            Yoonas
            • 18. Re: TNS-03505: Failed to resolve name
              936666
              >
              Can you connect this way?
              user/password@<ip/hostname>:1521/TESTDB
              Yes i am able to connect the database by the above way.
              What is the out put of lsnrctl at your database host
              LSNRCTL> status
              Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
              STATUS of the LISTENER
              ------------------------
              Alias LISTENER
              Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
              Start Date 08-FEB-2013 18:57:18
              Uptime 0 days 2 hr. 15 min. 40 sec
              Trace Level off
              Security ON: Local OS Authentication
              SNMP OFF
              Listener Parameter File E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
              Listener Log File e:\app\username\diag\tnslsnr\Servername\listener\alert\log.xml
              Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Hostname)(PORT=1521)))
              Services Summary...
              Service "TESTDB" has 1 instance(s).
              Instance "testdb", status READY, has 1 handler(s) for this service...
              Service "ORCL" has 1 instance(s).
              Instance "ORCL", status READY, has 1 handler(s) for this service...
              Service "GIODB" has 1 instance(s).
              Instance "giodb", status READY, has 1 handler(s) for this service...
              • 19. Re: TNS-03505: Failed to resolve name
                yoonas
                If your tnsparameter 'host' uses <hostname> not ip, can you ping to the host with hostname?

                Can you change to ip and try if you are using hostname
                • 20. Re: TNS-03505: Failed to resolve name
                  sb92075
                  yoonus wrote:
                  If your tnsparameter 'host' uses <hostname> not ip, can you ping to the host with hostname?

                  Can you change to ip and try if you are using hostname
                  problem does NOT involve hostname resolution or anything out on the network.
                  NO packets ever leave the client since the error occurs prior to attempting to do so.
                  TNS can not find/resolve the TNS alias name which is why error gets thrown.
                  • 21. Re: TNS-03505: Failed to resolve name
                    936666
                    So how to resolve this!
                    • 22. Re: TNS-03505: Failed to resolve name
                      yoonas
                      Give it a try, i guess the issue is happening because of your tnsnames.ora file location.
                      cmd
                      set TNS_ADMIN=C:\oracle    
                      echo %TNS_ADMIN%
                      sqlplus 
                      CONN scott/tiger@TESTDB
                      Note: Please make sure TNS_ADMIN is pointing to the correct directory path where you have copied your tnsnames.ora

                      If it doesn't help copy your tnsnames.ora to its default location and try

                      Edited by: yoonus on Feb 8, 2013 9:00 PM
                      • 23. Re: TNS-03505: Failed to resolve name
                        936666
                        H:\>set TNS_ADMIN=C:\Oracle
                        H:\>echo %TNS_ADMIN%
                        C:\Oracle

                        H:\>sqlplus /nolog

                        SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 9 12:45:18 2013

                        Copyright (c) 1982, 2010, Oracle. All rights reserved.

                        SQL> CONN scott/tiger@TESTDB
                        ERROR:
                        ORA-12154: TNS:could not resolve the connect identifier specified
                        • 24. Re: TNS-03505: Failed to resolve name
                          936666
                          I have removed the constants of C:\oracle to E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN
                          moved Tnsnsames.ora,Listener.ora,sqlnet.ora folder
                          and restarted the system and modified the environmental variable to access the path E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN

                          H:\>set TNS_ADMIN=E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN

                          H:\>echo %TNS_ADMIN%
                          E:\app\uasername\product\11.2.0\dbhome_1\NETWORK\ADMIN

                          H:\>sqlplus /nolog

                          SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 9 13:11:10 1018

                          Copyright (c) 1982, 2010, Oracle. All rights reserved.

                          SQL> CONN scott/tiger@TestDB
                          ERROR:
                          ORA-12154: TNS:could not resolve the connect identifier specified

                          Thanks!
                          • 25. Re: TNS-03505: Failed to resolve name
                            JohnWatson
                            933663 wrote:
                            I have removed the constants of C:\oracle to E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN
                            moved Tnsnsames.ora,Listener.ora,sqlnet.ora folder
                            and restarted the system and modified the environmental variable to access the path E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN

                            H:\>set TNS_ADMIN=E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN
                            look at the path above
                            H:\>echo %TNS_ADMIN%
                            E:\app\uasername\product\11.2.0\dbhome_1\NETWORK\ADMIN
                            and now look at the path above

                            As before, when you said you were setting a variable TNS_NAME and later claimed to be setting TNS_ADMIN, it is clear that reality and your statements do not match. This makes it hard to debug.
                            • 26. Re: TNS-03505: Failed to resolve name
                              936666
                              From the first i was using TNS_ADMIN in the environmental variable and not TNS_NAME it was my type error.Till yesterday it was in C:\oracle and later i have placed all the files to E:\app\username\product\11.2.0\dbhome_1\NETWORK\ADMIN that is the only change i have done.

                              Thanks!
                              • 27. Re: TNS-03505: Failed to resolve name
                                yoonas
                                >
                                E:\app\<font color="red"> uasername</font>\product\11.2.0\dbhome_1\NETWORK\ADMIN
                                >
                                actual is 'username' but when you set tns_admin its set to 'uasername', Pleas make sure you are setting the correct path (you can copy from address bar to make sure that you are giving proper path)


                                You can also try using Network Manager and test your connection

                                Network Manager > Service Naming > TESTDB - Test Service
                                • 28. Re: TNS-03505: Failed to resolve name
                                  Richard Harrison .
                                  Hi,
                                  I suggest you completely remove the entry from the tnsnames file and used netca to create it. There is possibly a hidden character causing the issue.

                                  Regards,
                                  Harry
                                  • 29. Re: TNS-03505: Failed to resolve name
                                    936666
                                    I am having problem only with this particular db and not for the other database.
                                    Where as i can access my ORCL database with the same steps.
                                    Only thing with my TESTDB is that i have created the database using the Scripts and not the DBCA. I think this is causing me some problem.

                                    Thanks!