8 Replies Latest reply: Oct 16, 2013 6:50 AM by Anar Godjaev RSS

    DataGuard Passwordfile

    yxes2013

      Hi all,

       

      11.2.0.1

      Aix 6.1

       

      I am still confused with password file as this is my first time to change it for DG. My boss has not granted my request to have a test server so I have to do it direct at PROD db.

       

      Supposing at the PRIMARY db, I connect to sys and issue command "ALTER USER SYS IDENTIFIED BY abc123";

      BUT I will not copy the PWDprod.ora to Standby DB. Instead I will connect to the database also and issue the same command as I did in the primary  "ALTER USER SYS IDENTIFIED BY abc123";

      Will this also work? Or copying is a must?

       

      Thanks a lot,

      zxy

        • 1. Re: DataGuard Passwordfile
          Alvaro

          You need a password  file for the Standby. You can create it manually with the ORAPWD utility.

           

          When you do alter user SYS it will attempt to sync it with your pw file. So if you have a pw file on both primary and standby, and you issue ALTER USER SYS on both of them, they should sync to the same password and thus resolve the connection.

           

          You need the same password file password for Primary and Standby. What I do usually is just an SCP to the $ORACLE_HOME/dbs on prod to standby and you're done.

           

          If you connect as sysdba over a network you NEED the password file for authentication. That is it's purpose.

           

          Read: Ask Tom "sys password change and orapwd file"

           

          Regards,

          • 2. Re: DataGuard Passwordfile
            Alvaro

            Actually, nevermind what I said. You will really need to copy it, because standby database remains on mount, and so there is no DD opened, you can't do an alter user.

             

            If you don't want to copy, you can still create one manually with the same password as prod with the ORAPWD utility.

             

            Unless you're gonna use an snapshot dataguard configuration? If it's opened on read/write than you should be able to ALTER USER SYS. Just be aware that the flashback operation in this case also rollsback account passwords on  the data dictionary.

             

            Regards,

            • 3. Re: DataGuard Passwordfile
              CKPT

              yxes2013 wrote:

               

              Hi all,

               

              11.2.0.1

              Aix 6.1

               

              I am still confused with password file as this is my first time to change it for DG. My boss has not granted my request to have a test server so I have to do it direct at PROD db.

               

              Supposing at the PRIMARY db, I connect to sys and issue command "ALTER USER SYS IDENTIFIED BY abc123";

              BUT I will not copy the PWDprod.ora to Standby DB. Instead I will connect to the database also and issue the same command as I did in the primary  "ALTER USER SYS IDENTIFIED BY abc123";

              Will this also work? Or copying is a must?

               

              Thanks a lot,

              zxy

              You have mentioned it is AIX unix, so the password file should be named as orapwprod PWDprod.ora is for windows.

              From 11g the password file should be copied and renamed as per the SID of the standby, It doesnt make any sense if you even create with orapwd utility. So copy is MUST.

              • 4. Re: DataGuard Passwordfile
                yxes2013

                Thanks Al & CKPT,

                 

                So to summarize:

                If you change pwdfile using "orapwd" command, it will update only the "orapwprod" file and not the database "SYS" user?

                If you change the password of user "SYS" using alter user command, It will update both the osfile "orapwdprod" and the 'SYS' db user.

                 

                So I conclude and recommend to user alter user so that both are sync. Am I right?

                • 5. Re: DataGuard Passwordfile
                  Alvaro
                  If you chage pwdfile using "orapwd" command, it will update only the "orapwprod" file and not the database "SYS" user?

                  Yes.

                   

                  If you change the password of user "SYS" using alter user command, It will update both the osfile "orapwdprod" and the 'SYS' db user.

                   

                  So I conclude and recommend to user alter user so that both are sync. Am I right?

                  Yes but you can't do an alter user on standby because it is MOUNT state. You need to copyt from prod or create one manually with the same password as prod.

                  • 6. Re: DataGuard Passwordfile
                    CKPT

                    yxes2013 wrote:

                     

                    Thanks Al & CKPT,

                     

                    So to summarize:

                    If you change pwdfile using "orapwd" command, it will update only the "orapwprod" file and not the database "SYS" user?

                    If you change the password of user "SYS" using alter user command, It will update both the osfile "orapwdprod" and the 'SYS' db user.

                     

                    So I conclude and recommend to user alter user so that both are sync. Am I right?

                    Yes, when managing SYS password always use orapwd utility.

                    • 7. Re: DataGuard Passwordfile
                      yxes2013

                      I am cleared now I thank you all!

                      • 8. Re: DataGuard Passwordfile
                        Anar Godjaev

                        Hi,

                         

                        Additional information

                         

                        http://prutser.wordpress.com/2011/06/13/password-file-maintenance-in-a-data-guard-environment/

                         

                        Also search for password in this document

                         

                        http://www.oracle.com/technetwork/database/features/availability/maa-wp-10g-racprimarysingleinstance-131970.pdf


                        late reply sorry


                        Thank you