6 Replies Latest reply: Oct 18, 2012 9:23 AM by Belt RSS

    Can't startup new standby db automatic

    Belt
      ENV:
      11.2.0.1
      oracle linux 5.2
      PRI:ORCL2
      STB:SBDB


      After switchover using broker,it sucessed。But the new standby db haven‘t startup automatic。
      The log on old standby db:

      Fatal NI connect error 12514, connecting to:
      (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=11g)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl2_DGB)(CID=(PROGRAM=oracle)(HOST=11g_stb)(USER=oracle))))

      VERSION INFORMATION:
      TNS for Linux: Version 11.2.0.1.0 - Production
      TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
      Time: 18-OCT-2012 09:54:15
      Tracing not turned on.
      Tns error struct:
      ns main err code: 12564

      TNS-12564: TNS:connection refused
      ns secondary err code: 0
      nt main err code: 0
      nt secondary err code: 0
      nt OS err code: 0




      and the primary listener.ora:

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11g)(PORT = 1521))
      )
      )

      SID_LIST_LISTENER=
      (SID_LIST=
      (SID_DESC=
      (GLOBAL_DBNAME=orcl2)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=orcl2)
      )
      (SID_DESC=
      (GLOBAL_NAME=orcl2_DGMGRL)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=orcl2)
      )
      (SID_DESC=
      (GLOBAL_NAME=orcl2_DGB)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=orcl2)
      )

      )

      ADR_BASE_LISTENER = /u01/app/oracle


      the standby listener.ora:

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11g_stb)(PORT = 1521))
      )
      )

      SID_LIST_LISTENER=
      (SID_LIST=
      (SID_DESC=
      (GLOBAL_DBNAME=sbdb)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=sbdb)
      )
      (SID_DESC=
      (GLOBAL_NAME=sbdb_DGMGRL)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=sbdb)
      )
      (SID_DESC=
      (GLOBAL_NAME=sbdb_DGB)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME=sbdb)
      )
      )


      ADR_BASE_LISTENER = /u01/app/oracle











      Though I can startup new standby db manaul,I still want to know why it haven't startup automatic?
        • 1. Re: Can't startup new standby db automatic
          Hiepnt
          Hello Belt ,
          Error
          TNS-12564: TNS:connection refused
          ns secondary err code: 0
          nt main err code: 0
          nt secondary err code: 0
          nt OS err code: 0
          Cause:
          Can not connect old primary,
          You check listener.ora, tnsnames.ora
          • 2. Re: Can't startup new standby db automatic
            Belt
            Hi, 965890

            I have already check it again,and I didn't find any error.

            The listener.ora is above,,
            tnsnames.ora from priary :


            orcl2 =
            (DESCRIPTION =
            (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 11g)(PORT = 1521))
            )
            (CONNECT_DATA =
            (SERVICE_NAME = orcl2)
            )
            )


            sbdb =
            (DESCRIPTION =
            (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 11g_stb)(PORT = 1521))
            )
            (CONNECT_DATA =
            (SERVICE_NAME = sbdb)
            )
            )




            from standby:

            sbdb =
            (DESCRIPTION =
            (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 11g_stb)(PORT = 1521))
            )
            (CONNECT_DATA =
            (SERVICE_NAME = sbdb)
            )
            )

            orcl2 =
            (DESCRIPTION =
            (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 11g)(PORT = 1521))
            )
            (CONNECT_DATA =
            (SERVICE_NAME = orcl2)
            )
            )





            thanks.
            • 3. Re: Can't startup new standby db automatic
              Sebastian Solbach -Dba Community-Oracle
              Hi,

              how did you connect to the broker to do the switchover?
              If you used / instead of TNS alias, the connection will be lost during switchover (exactly what you see).

              Regards
              Sebastian
              • 4. Re: Can't startup new standby db automatic
                mseberg
                Hello;

                You need to make sure local_listener settings are done appropriately on primary and standby side to avoid error like ‘Fatal NI connect error 12514, connecting to:’ and ‘TNS-12564: TNS:connection refused’.

                Would add this to both :
                INBOUND_CONNECT_TIMEOUT_LISTENER=120
                Its hard to see exactly what's wrong as yours appears to be very close. Your host and GLOBAL_DBNAME are not exactly what I expect. lsnrctl status is your friend.

                Compare to this example :

                http://www.visi.com/~mseberg/Data_Guard_Listener_Example.html

                Best Regards

                mseberg
                • 5. Re: Can't startup new standby db automatic
                  Belt
                  Hi,
                  I use dgmgrl sys/oracle@orcl2 to connect to the broker,and no matter dgmgrl sys/oracle@orcl2 or dgmgrl sys/oracle@sbdb was all sucessful.

                  Then i check the listener.ora carefully, i use GLOBAL_NAME instead of GLOBAL_DBNAME.
                  when i change it,it works...
                  • 6. Re: Can't startup new standby db automatic
                    Belt
                    you got it,thanks.

                    The problem is proved that I used GLOBAL_NAME which should be GLOBAL_DBNAME...