1 2 Previous Next 18 Replies Latest reply: Mar 12, 2012 6:51 AM by NikolayIvankin RSS

    database guard configurations for 11g R2

    773278
      hi all.

      i am using oracle Enterprise Linux 5.7 and oracle database 11g R2,i am trying to configure database guard for my database
      but i did not find correct and step wise guides,i read different types of notes and books but i did not understand
      that where and what should i change and for which system i should change this is really confusion for me
      i am not getting very well that for standby what should i do and for primarydb what should i do?
      plz if anyone knows or if he has the best notes plz share with me or plz guide me thanks in advance.

      killy
        • 1. Re: database guard configurations for 11g R2
          454960
          Hi,
          Ask specifically what has confused you so those could be answered.

          http://idevelopment.info/data/Oracle/DBA_tips/Data_Guard/DG_40.shtml (even though it's 10g steps are same).

          In 11g there's active data guard http://www.oracle.com/technetwork/database/enterprise-edition/overview/active-data-guard-11g-datasheet-1-134534.pdf
          http://www.databasejournal.com/features/oracle/article.php/3834931/Using-Oracle-11gs-Active-Data-Guard-and-Snapshot-Standby-Features.htm
          • 2. Re: database guard configurations for 11g R2
            Talip Hakan Ozturk
            http://taliphakanozturken.wordpress.com/2011/06/26/creating-standby-database-with-rman-active-database-duplication-in-11gr2/

            http://taliphakanozturken.wordpress.com/2011/10/28/physical-standby-database-switchover-failover-operations/



            Talip Hakan Ozturk
            http://taliphakanozturken.wordpress.com/
            • 3. Re: database guard configurations for 11g R2
              CKPT
              Hi,

              You can configure dataguard in 11g using active duplicate option, here you no need to have any backup too.
              In prior versions to perform duplicate you need to copy backup in remote destination.

              Coming to dataguard, after successful restore of database, you have o configure some parameters related to dataguard environment.
              Primary & standby

              Db_unique_name
              Log_archive_dest_2
              Log_archive_dest_state_2
              log_archive_config
              Fal_server
              • 4. Re: database guard configurations for 11g R2
                mseberg
                Kelly;

                I like to thing of Data guard as one database in different modes "Primary" and "Standby" mode. The Primary mode is sending redo and the Standby is catching redo. Only a handful of parameter need to changed for Data Guard
                on Oracle 11 :
                FAL_SERVER
                STANDBY_FILE_MANAGEMENT
                DB_UNIQUE_NAME
                DB_FILE_NAME_CONVERT
                LOG_FILE_NAME_CONVERT
                log_archive_dest_1
                log_archive_dest_2
                LOG_ARCHIVE_DEST_STATE_1
                LOG_ARCHIVE_DEST_STATE_2
                LOG_ARCHIVE_MAX_PROCESSES
                Some of these are optional, for example DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT are note needed if the directory structure is the same on both servers. LOG_ARCHIVE_DEST_STATE_2 is set to enable on the primary server and defer on standby server as a general rule.

                The other pieces are listener, tsnnames, a password file ( which must be an exact match on Oracle 11) and an spfile with most of the parameter I have listed. To make Data Guard a simple setup I have these short notes :

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

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

                Best Regards

                mseberg
                • 5. Re: database guard configurations for 11g R2
                  773278
                  hi

                  thanks i configured data guard and its working but i have one doubt i created table and insert some values but when i checked in standby database
                  so i did not find the same table which is created in primary but when i issued alter system switch logfile so after this i got the query for the table
                  is there a way to create log files in real time?

                  Note: after shutdown the primary its also creating log files in standby.
                  Kelly
                  • 6. Re: database guard configurations for 11g R2
                    NikolayIvankin
                    Kelly wrote:
                    hi

                    thanks i configured data guard and its working but i have one doubt i created table and insert some values but when i checked in standby database
                    so i did not find the same table which is created in primary but when i issued alter system switch logfile so after this i got the query for the table
                    is there a way to create log files in real time?
                    This depends on DB protection mode and sync log transport.

                    Few strings from my demo [url http://nikolayivankin.wordpress.com/2012/02/06/dgmgrl-configuration-of-disaster-recovery-in-few-steps/] DGMGRL… Configuration of Disaster Recovery in few steps
                    DGMGRL> edit database PRM set property LogXptMode=SYNC;
                    Property "logxptmode" updated
                    DGMGRL> edit database STB set property LogXptMode=SYNC;
                    Property "logxptmode" updated
                    DGMGRL> edit configuration set protection mode as MaxAvailability;
                    Succeeded.
                    • 7. Re: database guard configurations for 11g R2
                      773278
                      hi

                      i got this error.

                      Error: ORA-16642: DB_UNIQUE_NAME mismatch



                      here is the parameters file.

                      Primary database.
                      primary.__db_cache_size=264241152
                      primary.__java_pool_size=4194304
                      primary.__large_pool_size=4194304
                      primary.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
                      primary.__pga_aggregate_target=272629760
                      primary.__sga_target=457179136
                      primary.__shared_io_pool_size=0
                      primary.__shared_pool_size=167772160
                      primary.__streams_pool_size=4194304
                      *.audit_file_dest='/u01/app/oracle/admin/primary/adump'
                      *.audit_trail='db'
                      *.compatible='11.2.0.0.0'
                      *.control_files='/u01/app/oracle/oradata/primary/control01.ctl','/u01/app/oracle/flash_recovery_area/primary/control02.ctl'
                      *.db_block_size=8192
                      *.db_domain=''
                      *.db_name='primary'
                      *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
                      *.db_recovery_file_dest_size=4070572032
                      *.diagnostic_dest='/u01/app/oracle'
                      *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
                      *.memory_target=729808896
                      *.open_cursors=300
                      *.processes=150
                      *.remote_login_passwordfile='EXCLUSIVE'
                      *.undo_tablespace='UNDOTBS1'
                      *.log_archive_dest_1='LOCATION=/u01/archs mandatory reopen=300'
                      *.log_archive_dest_2='SERVICE=primarysb lgwr sync affirm'
                      *.log_archive_format='%t_%s_%r.dbf'
                      *.LOG_ARCHIVE_DEST_STATE_1=ENABLE
                      *.LOG_ARCHIVE_DEST_STATE_2=ENABLE
                      *.LOG_ARCHIVE_MAX_PROCESSES=30
                      *.FAL_SERVER=PRIMARY
                      *.FAL_CLIENT=STANDBY
                      *.DB_UNIQUE_NAME=PRIMARY
                      Standby Parameters file
                      primary.__db_cache_size=268435456
                      primary.__java_pool_size=4194304
                      primary.__large_pool_size=4194304
                      primary.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
                      primary.__pga_aggregate_target=293601280
                      primary.__sga_target=436207616
                      primary.__shared_io_pool_size=0
                      primary.__shared_pool_size=146800640
                      primary.__streams_pool_size=0
                      *.audit_file_dest='/u01/app/oracle/admin/primary/adump'
                      *.audit_trail='db'
                      *.compatible='11.2.0.0.0'
                      *.control_files='/u01/app/oracle/oradata/primary/controlsb.ctl'
                      *.db_block_size=8192
                      *.db_domain=''
                      *.db_name='primary'
                      *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
                      *.db_recovery_file_dest_size=4070572032
                      *.diagnostic_dest='/u01/app/oracle'
                      *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
                      *.memory_target=729808896
                      *.open_cursors=300
                      *.processes=150
                      *.remote_login_passwordfile='EXCLUSIVE'
                      *.undo_tablespace='UNDOTBS1'
                      *.log_archive_format='%t_%s_%r.dbf'
                      *.standby_file_management=auto
                      *.log_archive_dest_1='LOCATION=/u01/archs mandatory reopen=300'
                      *.LOG_ARCHIVE_DEST_STATE_1=ENABLE
                      *.LOG_ARCHIVE_DEST_STATE_2=ENABLE
                      *.LOG_ARCHIVE_MAX_PROCESSES=30
                      *.FAL_SERVER=PRIMARY
                      *.FAL_CLIENT=STANDBY
                      *.DB_UNIQUE_NAME=PRIMARYSB
                      Note:- I have same DB name as PRIMARY...
                      • 8. Re: database guard configurations for 11g R2
                        NikolayIvankin
                        issue in dgmgrl
                        show database verbose <primary db>;
                        show database <primary db> InconsistentLogXptProps;
                        show database <primary db> InconsistentProperties;
                        show database verbose <standby db>;
                        show database <standby db> InconsistentLogXptProps;
                        show database <standby db> InconsistentProperties;
                        and post result here
                        • 9. Re: database guard configurations for 11g R2
                          773278
                          hi

                          DGMGRL> create configuration PRIMARYSB as primary database is PRM connect identifier is PRM;
                          Error: ORA-16642: DB_UNIQUE_NAME mismatch
                          
                          Failed.
                          DGMGRL>  create configuration PRIMARYSB as primary database is PRM connect identifier is PRM;
                          Error: ORA-16642: DB_UNIQUE_NAME mismatch
                          
                          Failed.
                          DGMGRL> show database verbose primary;
                          ORA-16532: Data Guard broker configuration does not exist
                          
                          Configuration details cannot be determined by DGMGRL
                          DGMGRL>  show database verbose primary;
                          ORA-16532: Data Guard broker configuration does not exist
                          
                          Configuration details cannot be determined by DGMGRL
                          DGMGRL> show database primary InconsistentLogXPptPorps;                
                          ORA-16532: Data Guard broker configuration does not exist
                          
                          Configuration details cannot be determined by DGMGRL
                          DGMGRL> 
                          • 10. Re: database guard configurations for 11g R2
                            NikolayIvankin
                            Kelly wrote:
                            hi

                            DGMGRL> create configuration PRIMARYSB as primary database is PRM connect identifier is PRM;
                            Error: ORA-16642: DB_UNIQUE_NAME mismatch
                            Ok, you don't have configuration.
                            Have you used identifiers from my demo? You shouldn't, use yours.
                            And please post exactly what you do and response.
                            • 11. Re: database guard configurations for 11g R2
                              773278
                              hi

                              i posted my paramters and if possible i can give u permission to connect to my laptop and see the configurations
                              and from u r demo i just used the following.

                              alter system set dg_broker_start=true;


                              kelly
                              • 12. Re: database guard configurations for 11g R2
                                NikolayIvankin
                                >
                                i posted my paramters and if possible i can give u permission to connect to my laptop and see the configurations
                                and from u r demo i just used the following.
                                Perhaps later.
                                alter system set dg_broker_start=true;
                                connect to dgmgrl and issue
                                  create configuration DR as primary database is PRIMARY#1 connect identifier is PRIMARY#2;
                                Where PRIMARY#1 is your DB_UNIQUE_NAME from spfile and PRIMARY#2 is tnsnames.ora file entry, that match your PRIMARY#1 database.
                                • 13. Re: database guard configurations for 11g R2
                                  773278
                                  hi

                                  i think now it will work plz see
                                  DGMGRL> create configuration PRIMARYSB as primary database is primary connect identifier is primary;
                                  Configuration "primarysb" created with primary database "primary"
                                  DGMGRL> 
                                  DGMGRL> add database PRIMARYSB  as connect identifier is PRIMARYSB  maintained as physical;
                                  Database "primarysb" added
                                  DGMGRL> enable configuration
                                  Enabled.
                                  
                                  DGMGRL> show configuration
                                  
                                  Configuration - primarysb
                                  
                                    Protection Mode: MaxAvailability
                                    Databases:
                                      primary   - Primary database
                                        Error: ORA-16797: database is not using a server parameter file
                                  
                                      primarysb - Physical standby database
                                        Error: ORA-16797: database is not using a server parameter file
                                  
                                  Fast-Start Failover: DISABLED
                                  
                                  Configuration Status:
                                  ERROR
                                  kelly

                                  Edited by: Kelly on Mar 12, 2012 3:59 AM

                                  Edited by: Kelly on Mar 12, 2012 4:01 AM
                                  • 14. Re: database guard configurations for 11g R2
                                    NikolayIvankin
                                    yes, 1st step is passed, then add standby db.
                                    1 2 Previous Next