6 Replies Latest reply: Apr 7, 2012 7:33 AM by 926275 RSS

    Data guard implementation

    926275
      i am trying to implement data guard in test setup.

      primary database name is test & secondary db name is testdr.. following is a primary database init.ora file...

      test.__db_cache_size=3019898880
      test.__java_pool_size=67108864
      test.__large_pool_size=67108864
      test.__oracle_base='c:\app\administrator'#ORACLE_BASE set from environment
      test.__pga_aggregate_target=2751463424
      test.__sga_target=4093640704
      test.__shared_io_pool_size=0
      test.__shared_pool_size=872415232
      test.__streams_pool_size=0
      *.audit_file_dest='c:\app\administrator\admin\test\adump'
      *.audit_trail='db'
      *.compatible='11.2.0.0.0'
      *.control_files='c:\app\administrator\oradata\test\control01.ctl','C:\app\Administrator\flash_recovery_area\test\control02.ctl'
      *.db_block_size=8192
      *.db_domain=''
      *.db_name='test'
      *.db_recovery_file_dest_size=2g
      *.db_recovery_file_dest='c:\app\administrator\flash_recovery_area'
      *.db_unique_name='test'
      db_file_name_convert='c:\app\Administrator\oradata\testdr\','c:\app\Administrator\oradata\test\'
      log_file_name_convert='c:\app\administrator\oradata\testdr\','c:\app\administrator\oradata\test\'
      *.diagnostic_dest='c:\app\administrator'
      *.dispatchers='(PROTOCOL=TCP) (SERVICE=TESTXDB)'
      *.fal_client='TEST'
      *.fal_server='TESTDR'
      *.log_archive_dest_1='LOCATION=c:\app\administrator\oradata\backup VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=test'
      *.log_archive_dest_2='SERVICE=TESTDR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testdr'
      *.log_archive_dest_state_1='ENABLE'
      *.log_archive_dest_state_2='DEFER'
      *.log_archive_format='ARC%S_%R.%T'
      *.memory_target=6794772480
      *.open_cursors=300
      *.processes=150
      *.remote_login_passwordfile='EXCLUSIVE'
      *.service_names='TEST'
      *.standby_file_management='AUTO'
      *.undo_tablespace='UNDOTBS1'



      and following is a standy databse init.ora file


      testdr.__db_cache_size=3019898880
      testdr.__java_pool_size=67108864
      testdr.__large_pool_size=67108864
      testdr.__oracle_base='c:\app\administrator'#ORACLE_BASE set from environment
      testdr.__pga_aggregate_target=2751463424
      testdr.__sga_target=4093640704
      testdr.__shared_io_pool_size=0
      testdr.__shared_pool_size=872415232
      testdr.__streams_pool_size=0
      *.audit_file_dest='c:\app\administrator\admin\testdr\adump'
      *.audit_trail='db'
      *.compatible='11.2.0.0.0'
      *.control_files='c:\app\administrator\oradata\testdr\control01.ctl','C:\app\Administrator\flash_recovery_area\testdr\control02.ctl'
      *.db_block_size=8192
      *.db_domain=''
      *.db_name='testdr'
      *.db_recovery_file_dest_size=2g
      *.db_recovery_file_dest='c:\app\administrator\flash_recovery_area'
      *.db_unique_name='testdr'
      db_file_name_convert='c:\app\Administrator\oradata\test\','c:\app\Administrator\oradata\testdr\'
      log_file_name_convert='c:\app\administrator\oradata\test\','c:\app\administrator\oradata\testdr\'
      *.diagnostic_dest='c:\app\administrator'
      *.dispatchers='(PROTOCOL=TCP) (SERVICE=TESTXDB)'
      *.fal_client='TESTDR'
      *.fal_server='TEST'
      *.log_archive_dest_1='LOCATION=c:\app\administrator\oradata\backup VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=testdr'
      *.log_archive_dest_2='SERVICE=TEST ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=test'
      *.log_archive_dest_state_1='ENABLE'
      *.log_archive_dest_state_2='ENABLE'
      *.log_archive_format='ARC%S_%R.%T'
      *.memory_target=6794772480
      *.open_cursors=300
      *.processes=150
      *.remote_login_passwordfile='EXCLUSIVE'
      *.service_names='TEST'
      *.standby_file_management='AUTO'
      *.undo_tablespace='UNDOTBS1'
        • 1. Re: Data guard implementation
          926275
          following is a primary db tnsnames.ora file:

          # tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
          # Generated by Oracle configuration tools.

          ORACLR_CONNECTION_DATA =
          (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          )
          (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
          )
          )

          TEST =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.248)(PORT = 1521))
          (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = test)
          )
          )



          TESTDR =
          (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.249)(PORT = 1521))
          )
          (CONNECT_DATA =
          (SERVICE_NAME = testdr)
          )
          )


          following is a standby db tnsnames.ora file:


          # tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
          # Generated by Oracle configuration tools.

          ORACLR_CONNECTION_DATA =
          (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          )
          (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
          )
          )

          TESTDR =
          (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.249)(PORT = 1521))
          )
          (CONNECT_DATA =
          (SERVICE_NAME = testdr)
          )
          )


          TEST =
          (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.248)(PORT = 1521))
          )
          (CONNECT_DATA =
          (SERVICE_NAME = test)
          )
          )
          • 2. Re: Data guard implementation
            926275
            sqlnet.ora file contains following thing in both the servers:

            # This file is actually generated by netca. But if customers choose to
            # install "Software Only", this file wont exist and without the native
            # authentication, they will not be able to connect to the database on NT.

            SQLNET.AUTHENTICATION_SERVICES = (NTS)


            following is a primary listener.ora file:

            # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
            # Generated by Oracle configuration tools.

            SID_LIST_LISTENER =
            (SID_LIST =
            (SID_DESC =
            (SID_NAME =test)
            (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
            (PROGRAM = extproc)
            (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
            )
            )

            LISTENER =
            (DESCRIPTION_LIST =
            (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.248)(PORT = 1521))
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
            )
            )

            ADR_BASE_LISTENER = C:\app\Administrator

            ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON



            following is a standby listener.ora file:


            # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
            # Generated by Oracle configuration tools.

            SID_LIST_LISTENER =
            (SID_LIST =
            (SID_DESC =
            (SID_NAME = testdr)
            (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
            (PROGRAM = extproc)
            (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
            )
            )

            LISTENER =
            (DESCRIPTION_LIST =
            (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.249)(PORT = 1521))
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
            )
            )

            ADR_BASE_LISTENER = C:\app\Administrator

            ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON
            • 3. Re: Data guard implementation
              926275
              when i connect the primary db through RMAN by following command

              connect target sys/sys@test

              it gives following error.

              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              ORA-12154: TNS:could not resolve the connect identifier specified..


              so please suggest whether i have to change or add anything in the above files....
              • 4. Re: Data guard implementation
                kuljeet singh -
                looks your entry in tnsnames.ora not valid.

                try this
                tnsping test
                • 5. Re: Data guard implementation
                  926275
                  when i try to ping from the both servers i got the below error.

                  SP2-0734: unknown command beginning "tnsping te..." - rest of line ignored.

                  please suggest what changes should i do in the tnsnames.ora file?
                  • 6. Re: Data guard implementation
                    926275
                    while connecting standby database as sys/sys as sysdba, the error comes as following

                    ERROR: ORA-12560: TNS:protocol adapter error