7 Replies Latest reply on Mar 20, 2014 9:11 AM by Uwehesse-Oracle

    Datagaurd parameter DB_UNIQUE_NAME

    Vikas0204

      Hello All

       

      I have some confussion regarding DB_UNIQUIE_NAME.

       

      Why the DB_NAME and DB_UNIQUE_NAME are same on primary side.

       

      Can we make different on primary side and same on Satnd by side.

       

      One more thing, i want to ask

      How could i know that switchover has been performed by Switchover_Staus in V$database.

       

      Regards

      Vikas Sharma

        • 1. Re: Datagaurd parameter DB_UNIQUE_NAME
          AK - Oracle

          The DB_NAME of the standby database will be the same as that of the primary, but it must have a different DB_UNIQUE_NAME value


          DB_UNIQUE_NAME specifies a globally unique name for the database. Databases with the same DB_NAME within the same DB_DOMAIN (for example, copies of a database created for reporting or a physical standby) must have a unique DB_UNIQUE_NAME. Every database's DB_UNIQUE_NAME must be unique within the enterprise.


          DB_NAME specifies a database identifier of up to 8 characters. This parameter must be specified and must correspond to the name specified in the CREATE DATABASE statement.

          If you have multiple databases, the value of this parameter should match the Oracle instance identifier of each one to avoid confusion with other databases running on the system. The value of DB_NAME should be the same in both the standby and production initialization parameter files.

           

          DATABASE_ROLEVARCHAR2(16)Current role of the database:
          • LOGICAL STANDBY
          • PHYSICAL STANDBY
          • PRIMARY

           

          select database_role from v$database; to current role .

          1 person found this helpful
          • 2. Re: Datagaurd parameter DB_UNIQUE_NAME
            Aman....

            Ak-Oracle,

             

            Please cite the source the of the text ,DB_UNIQUE_NAME

             

            Aman....

            • 3. Re: Datagaurd parameter DB_UNIQUE_NAME
              Aman....

              Besides the definition given in the previous response , the thing to remember is that using DB_UNIQUE_NAME , you are going to identify your database with a unique name in your configuration. So if your db name is ORCL, for primary the same db would be called as , for example, PRIM and for a standby (clone of the same database) , the name would be called STDBY. Think about it, data guard is nothing but the play around of the redo logs i.e. you are using the redo log files of one database(primary) to recover the data files of the another database, the standby . Is it possible that you are able to apply the redo /archived redo of one database with the name T over another database with the name X? No, you can't! That's why the db_name is going to be the same but to identify the databsae in the network configuration, you would be giving it unique names using the parameter DB_UNIQUE_NAME.

               

              HTH

              Aman....

              1 person found this helpful
              • 4. Re: Datagaurd parameter DB_UNIQUE_NAME
                Vikas0204

                on primary

                DB_NAME=prim

                DB_UNIQUE_NAME=glb

                 

                on standby

                DB_NAME=prim

                DB_UNIQUE_NAME=glb2

                 

                is it ok?

                • 5. Re: Datagaurd parameter DB_UNIQUE_NAME
                  Uwehesse-Oracle

                  DB_UNIQUE_NAME defaults to the value of DB_NAME.

                  Logical standby databases have there own DB_NAME different from the primary's, by the way. If they are not transient, that is.

                   

                  A physical standby database always has the same DB_NAME as the primary database,

                  because that value is stored in the data dictionary which must be identical to the primary's on a physical standby.

                   

                  The identical value of DB_NAME makes it impossible to use that parameter to differentiate between primary and standby when it comes to specify the direction where to send redo to.

                  Therefore, DB_UNIQUE_NAME was introduced.

                  It also has some relations to RMAN configuration settings.

                   

                  It is common to have DB_UNIQUE_NAME on the same (default) value as DB_NAME for the primary database, but that is not mandatory.

                   

                  Finally, we have a special forum for Data Guard questions: http://forums.oracle.com/forums/forum.jspa?forumID=849&start=0

                   

                  Kind regards

                  Uwe Hesse

                  1 person found this helpful
                  • 6. Re: Datagaurd parameter DB_UNIQUE_NAME
                    Vikas0204

                    Thank you UweHesse

                     

                    Can we use

                     

                    on primary

                    DB_NAME=prim

                    DB_UNIQUE_NAME=glb

                     

                    on standby

                    DB_NAME=prim

                    DB_UNIQUE_NAME=glb2


                    • 7. Re: Datagaurd parameter DB_UNIQUE_NAME
                      Uwehesse-Oracle

                      Yes, you can assign any DB_UNIQUE_NAME to any database as long as it is unique in the Data Guard configuration.