1 2 3 4 Previous Next 47 Replies Latest reply on Feb 5, 2014 9:21 AM by fb767351-a660-4b18-9a9f-73bc141f6a0c Go to original post
      • 30. Re: ORA-12545: Connect failed because target host or object does not exist
        fb767351-a660-4b18-9a9f-73bc141f6a0c

        You should really consider changing the name of that server to something other than "localhost".  I'm being polite though because it's really not an option if you want that server to function correctly on a network.  "Localhost" is a reserved name and it has special meaning in the world of networking.  Read that Wiki article that SB shared with you and it should make more sense.

        As per your suggestion and Sb article, now I have changed my stand by server name as newyork:

         

        [oracle@newyork ~]$ hostname

        newyork

         

         

        -Michel

        • 31. Re: ORA-12545: Connect failed because target host or object does not exist
          sb92075

          /etc/hosts file on both systems need to be updated to contain correct/new hostname & IP#

          • 32. Re: ORA-12545: Connect failed because target host or object does not exist
            fb767351-a660-4b18-9a9f-73bc141f6a0c

            Hello Cleavitt/Sb/KarK,

             

            I have disable the firewall on both the servers and tried connecting again. Now the error is coming, its related to lister:

             

            [oracle@newyork ~]$ rman target sys/oracle_4U@prod auxiliary sys/oracle_4U@prod_stby

             

             

            Recovery Manager: Release 11.2.0.1.0 - Production on Tue Feb 4 23:47:29 2014

             

             

            Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

             

             

            RMAN-00571: ===========================================================

            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

            RMAN-00571: ===========================================================

            RMAN-00554: initialization of internal recovery manager package failed

            RMAN-04005: error from target database:

            ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

             

             

            -Michel

            • 33. Re: ORA-12545: Connect failed because target host or object does not exist
              sb92075

              ORA-12514 ALWAYS only occurs due to a problem on DB Server system.

              One cause of this problem is when the Oracle database is down & needs to be started.

              A remote client send a request to the Listener asking to be connected to a specific service.

              If/when the listener does not know anything about that service, the listener responds with ORA-12514

               

               

               

              post results from the following two OS commands:

               

              lsnrctl status

              lsnrctl service

               

               

               

              Since every connection request to the listener gets logged, listener.log file will contain a line with 12514 as status code.

               

               

               

              *This line contains valuable debugging details. So post this line & surrounding lines.*

               

               

               

              for additional debugging suggestions read the URL below:

               

              http://edstevensdba.wordpress.com/2011/03/19/ora-12514/

              • 34. Re: ORA-12545: Connect failed because target host or object does not exist
                fb767351-a660-4b18-9a9f-73bc141f6a0c

                Hi Sb,

                 

                Yes both the servers are contaning their IPs and communication also:

                 

                on Primary server US:

                 

                [oracle@US ~]$ cat /etc/hosts

                # Do not remove the following line, or various programs

                # that require network functionality will fail.

                127.0.0.1               localhost.localdomain localhost

                192.168.188.130         US.localdomain US

                192.168.188.131         newyork

                ::1             localhost6.localdomain6 localhost6

                 

                On standby server newyork:

                 

                [oracle@newyork ~]$ cat /etc/hosts

                # Do not remove the following line, or various programs

                # that require network functionality will fail.

                127.0.0.1               localhost.localdomain localhost

                ::1             localhost6.localdomain6 localhost6

                192.168.188.131  newyork.localdomain newyork

                192.168.188.130       US

                 

                -MIchel

                • 35. Re: ORA-12545: Connect failed because target host or object does not exist
                  cleavitt

                  Well, you're getting closer.  One layer at a time.

                   

                  If you haven't already done so, update your tnsnames.ora file and update the "localhost" reference to "newyork".

                   

                  Then post the results of...

                   

                  lsnrctl status

                   

                  You can also use these commands to troubleshoot Oracle Listener connectivity issues more easily...

                   

                  tnsping prod

                  tnsping prod_stby

                   

                  Message was edited by: cleavitt to fix TNSPing command examples.

                  • 36. Re: ORA-12545: Connect failed because target host or object does not exist
                    fb767351-a660-4b18-9a9f-73bc141f6a0c

                    sb92075 wrote:

                     

                    post results from the following two OS commands:

                     

                    lsnrctl status

                    lsnrctl service

                                                                                                                                                                                                                                                                  

                     

                     

                    Here is the result of my standby server newyork details:


                    [oracle@newyork ~]$ lsnrctl status

                     

                    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-FEB-2014 23:57:12


                    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=newyork.localdomain)(PORT=1521)))

                    STATUS of the LISTENER

                    ------------------------

                    Alias                     LISTENER

                    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

                    Start Date                04-FEB-2014 23:32:41

                    Uptime                    0 days 0 hr. 24 min. 32 sec

                    Trace Level               off

                    Security                  ON: Local OS Authentication

                    SNMP                      OFF

                    Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

                    Listener Log File         /u01/app/oracle/diag/tnslsnr/newyork/listener/alert/log.xml

                    Listening Endpoints Summary...

                      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=newyork.localdomain)(PORT=1521)))

                      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

                    Services Summary...

                    Service "prod.WORLD" has 1 instance(s).

                      Instance "prod", status UNKNOWN, has 1 handler(s) for this service...

                    Service "prod_stby" has 1 instance(s).

                      Instance "prod", status BLOCKED, has 1 handler(s) for this service...

                    The command completed successfully

                    [oracle@newyork ~]$ lsnrctl service

                     

                     

                    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-FEB-2014 23:57:25

                     

                     

                    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

                     

                     

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=newyork.localdomain)(PORT=1521)))

                    Services Summary...

                    Service "prod.WORLD" has 1 instance(s).

                      Instance "prod", status UNKNOWN, has 1 handler(s) for this service...

                        Handler(s):

                          "DEDICATED" established:18 refused:0

                             LOCAL SERVER

                    Service "prod_stby" has 1 instance(s).

                      Instance "prod", status BLOCKED, has 1 handler(s) for this service...

                        Handler(s):

                          "DEDICATED" established:0 refused:0 state:ready

                             LOCAL SERVER

                    The command completed successfully

                     

                    I guess as per the command shows listener is not communication with my primary server US. it is only communicating with local server newyork. Please let me know which entry I need to modify on my primary server in tnsnames. Below is the entry of my primary server US tns details:

                     

                    [oracle@US admin]$ more tnsnames.ora

                    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

                    # Generated by Oracle configuration tools.

                     

                     

                    PROD =

                      (DESCRIPTION =

                        (ADDRESS = (PROTOCOL = TCP)(HOST = US)(PORT = 1521))

                        (CONNECT_DATA =

                          (SERVER = DEDICATED)

                          (SERVICE_NAME = prod.WORLD)

                        )

                      )

                     

                     

                    PROD_STBY =

                      (DESCRIPTION =

                        (ADDRESS = (PROTOCOL = TCP)(HOST = newyork)(PORT = 1521))

                        (CONNECT_DATA =

                          (SERVER = DEDICATED)

                          (SERVICE_NAME = prod.WORLD)

                        )

                      )

                     

                     

                    -Michel

                    • 37. Re: ORA-12545: Connect failed because target host or object does not exist
                      KarK

                      Post the tnsnames file of standby server.

                       

                      Will you able connect as below:

                       

                      sqlplus username/password

                      • 38. Re: ORA-12545: Connect failed because target host or object does not exist
                        fb767351-a660-4b18-9a9f-73bc141f6a0c

                        cleavitt wrote:

                         

                        Well, you're getting closer.  One layer at a time.

                         

                        If you haven't already done so, update your tnsnames.ora file and update the "localhost" reference to "newyork".

                         

                        Then post the results of...

                         

                        lsnrctl status

                         

                        You can also use these commands to troubleshoot Oracle Listener connectivity issues more easily...

                         

                        tnsping prod

                        tnsping prod_stby

                         

                        Cleavitt,

                         

                        tnsping ping is happening from both the servers now.

                         

                        On primary server US tnsping to standby database prod_stby:


                        [oracle@US ~]$ tnsping prod_stby

                         

                         

                        TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 05-FEB-2014 00:10:14

                         

                         

                        Copyright (c) 1997, 2009, Oracle.  All rights reserved.

                         

                         

                        Used parameter files:

                        /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora

                         

                         

                         

                         

                        Used TNSNAMES adapter to resolve the alias

                        Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = newyork)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prod.WORLD)))

                        OK (10 msec)

                         

                        On Standby server newyork tnsping to primary database prod:

                         

                        [oracle@newyork ~]$ tnsping prod

                         

                         

                        TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 05-FEB-2014 00:11:22

                         

                         

                        Copyright (c) 1997, 2009, Oracle.  All rights reserved.

                         

                         

                        Used parameter files:

                         

                         

                         

                         

                        Used TNSNAMES adapter to resolve the alias

                        Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = US)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prod.WORLD)))

                        OK (20 msec)

                         

                        but remote connection is not happening till now:

                         

                        [oracle@newyork ~]$ sqlplus sys/oracle_4U@prod

                         

                         

                        SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 5 00:11:53 2014

                         

                         

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

                         

                         

                        ERROR:

                        ORA-12514: TNS:listener does not currently know of service requested in connect

                        descriptor

                         

                        Enter User name:

                         

                        my primary database prod is up and tunning fine:

                         

                        SQL> select name, open_mode from v$database;

                         

                         

                        NAME      OPEN_MODE

                        --------- --------------------

                        PROD      READ WRITE

                         

                         

                        -Michel

                        • 39. Re: ORA-12545: Connect failed because target host or object does not exist
                          sb92075

                          Since every connection request to the listener gets logged,

                          listener.log file will contain a line with 12514 as status code.

                           

                          This line contains valuable debugging details. So post this line & surrounding lines.

                          • 40. Re: ORA-12545: Connect failed because target host or object does not exist
                            fb767351-a660-4b18-9a9f-73bc141f6a0c

                            KarK wrote:

                             

                            Post the tnsnames file of standby server.

                                 

                            Kark,

                            Below is my standby tns entry:

                             

                            [oracle@newyork admin]$ more tnsnames.ora

                            PROD =

                              (DESCRIPTION =

                                (ADDRESS = (PROTOCOL = TCP)(HOST = US)(PORT = 1521))

                                (CONNECT_DATA =

                                  (SERVER = DEDICATED)

                                  (SERVICE_NAME = prod.WORLD)

                                )

                              )

                             

                             

                            PROD_STBY =

                              (DESCRIPTION =

                                (ADDRESS = (PROTOCOL = TCP)(HOST = newyork)(PORT = 1521))

                                (CONNECT_DATA =

                                  (SERVER = DEDICATED)

                                  (SERVICE_NAME = prod.WORLD)

                                )

                              )

                             

                             

                             

                            Will you able connect as below:

                             

                            sqlplus username/password

                            No I am able to connect my primary database by this:

                             

                            [oracle@newyork admin]$ sqlplus sys/oracle_4U@prod

                             

                             

                            SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 5 00:17:20 2014

                             

                             

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

                             

                             

                            ERROR:

                            ORA-12514: TNS:listener does not currently know of service requested in connect

                            descriptor

                             

                             

                             

                             

                            Enter user-name:

                             

                             

                            -Michel

                            • 41. Re: ORA-12545: Connect failed because target host or object does not exist
                              fb767351-a660-4b18-9a9f-73bc141f6a0c

                              Sorry for delay Sb,

                               

                              Here is my listener log file details:

                               

                               

                              <msg time='2014-02-05T00:22:17.235+05:30' org_id='oracle' comp_id='tnslsnr'

                              type='UNKNOWN' level='16' host_id='newyork'

                              host_addr='192.168.188.131'>

                              <txt>05-FEB-2014 00:22:17 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=prod.WORLD)(CID=(PROGRAM=oracle)(HOST=US)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.188.130)(PORT=41610)) * establish * prod.WORLD * 0

                              </txt>

                              </msg>

                              <msg time='2014-02-05T00:22:17.761+05:30' org_id='oracle' comp_id='tnslsnr'

                              type='UNKNOWN' level='16' host_id='newyork'

                              host_addr='192.168.188.131'>

                              <txt>05-FEB-2014 00:22:17 * service_update * prod * 0

                              </txt>

                              </msg>

                              <msg time='2014-02-05T00:22:56.859+05:30' org_id='oracle' comp_id='tnslsnr'

                              type='UNKNOWN' level='16' host_id='newyork'

                              host_addr='192.168.188.131'>

                              <txt>WARNING: Subscription for node down event still pending

                              </txt>

                              </msg>

                              <msg time='2014-02-05T00:22:56.860+05:30' org_id='oracle' comp_id='tnslsnr'

                              type='UNKNOWN' level='16' host_id='newyork'

                              host_addr='192.168.188.131'>

                              <txt>05-FEB-2014 00:22:56 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=newyork)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0

                              </txt>

                              </msg>

                              <msg time='2014-02-05T00:23:17.350+05:30' org_id='oracle' comp_id='tnslsnr'

                              type='UNKNOWN' level='16' host_id='newyork'

                              host_addr='192.168.188.131'>

                              <txt>05-FEB-2014 00:23:17 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=prod.WORLD)(CID=(PROGRAM=oracle)(HOST=US)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.188.130)(PORT=41623)) * establish * prod.WORLD * 0

                              </txt>

                              </msg>

                               

                               

                               

                              -Michel

                              • 42. Re: ORA-12545: Connect failed because target host or object does not exist
                                sb92075

                                posted excerpt shows only success (status code  = 0) & no error status (12514)

                                 

                                This might indicate that you are actually connecting to some other host than the one where you got the posted excerpt.

                                • 43. Re: ORA-12545: Connect failed because target host or object does not exist
                                  fb767351-a660-4b18-9a9f-73bc141f6a0c

                                  sb92075 wrote:

                                   

                                  posted excerpt shows only success (status code  = 0) & no error status (12514)

                                   

                                  This might indicate that you are actually connecting to some other host than the one where you got the posted excerpt.Th

                                  The standby server's vlistener is communicating with thier only local host. its is not communicating my my primary server US. Please let me know if I need to make some entry in my standby server's listener file. Here is the detail of my standby server's (newyork) listener entry:

                                   

                                  [oracle@newyork admin]$ more listener.ora

                                  SID_LIST_LISTENER =

                                    (SID_LIST =

                                      (SID_DESC =

                                        (GLOBAL_DBNAME = prod.WORLD)

                                        (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

                                        (SID_NAME = prod)

                                      )

                                    )

                                   

                                   

                                  LISTENER =

                                    (DESCRIPTION_LIST =

                                      (DESCRIPTION =

                                        (ADDRESS = (PROTOCOL = TCP)(HOST = newyork.localdomain)(PORT = 1521))

                                      )

                                      (DESCRIPTION =

                                        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

                                      )

                                    )

                                   

                                   

                                  ADR_BASE_LISTENER = /u01/app/oracle

                                   

                                   

                                  -Michel

                                  • 44. Re: ORA-12545: Connect failed because target host or object does not exist
                                    sb92075

                                    no listener.ora file is required to start or use Oracle listener.

                                     

                                    lsnrctl stop

                                    mv listener.ora listener.ora.sav

                                    lsnrctl start

                                    lsnrctl status

                                    # wait 60+ seconds then  do as below

                                     

                                    sqlplus sys/oracle_4U@prod