12 Replies Latest reply: Apr 30, 2012 9:23 PM by Seberg RSS

    Automatic shipping of Archive log

    007
      Hi,

      I am using Oracle 10g(10.2.0.1) in RHEL 5 server. i have duplicated my prod database to standby and i want my archive logs to be shipped automatically. i have used the alter system log_archive_dest_2='service=STANDBY optional reopen=20' in my prod database but the archive logs are not shipped automatically. What might be the reason??

      Regards,

      007
        • 1. Re: Automatic shipping of Archive log
          CKPT
          I am using Oracle 10g(10.2.0.1) in RHEL 5 server. i have duplicated my prod database to standby and i want my archive logs to be shipped automatically. i have used the alter system log_archive_dest_2='service=STANDBY optional reopen=20' in my prod database but the archive logs are not shipped automatically. What might be the reason??
          Its not only with that parameter, you need to check

          1) primary alert log file post if any errors after performing logswitch.
          2) select severity,message,timestamp from v$dataguard_status;
          • 2. Re: Automatic shipping of Archive log
            007
            Hi CKPT,

            The below contents are of v$dataguard_status

            PING[ARC1]: Heartbeat failed to connect to standby 'STANDBY'. Error is 16191.

            Error 30-APR-12
            Error 1017 received logging on to the standby

            Error 30-APR-12
            PING[ARC1]: Heartbeat failed to connect to standby 'STANDBY'. Error is 16191.

            The below contents are of aler_log of PRIMARY DATABASE


            Check that the primary and standby are using a password file
            and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
            and that the SYS password is same in the password files.
            returning error ORA-16191
            It may be necessary to define the DB_ALLOWED_LOGON_VERSION
            initialization parameter to the value "10". Check the
            manual for information on this initialization parameter.
            ------------------------------------------------------------
            Mon Apr 30 21:36:11 2012
            Errors in file /data/u01/app/oracle/admin/ORADB/bdump/oradb_arc1_3233.trc:
            ORA-16191: Primary log shipping client not logged on standby
            PING[ARC1]: Heartbeat failed to connect to standby 'STANDBY'. Error is 16191.
            Mon Apr 30 21:37:25 2012
            Error 1017 received logging on to the standby
            ------------------------------------------------------------
            Check that the primary and standby are using a password file
            and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
            and that the SYS password is same in the password files.
            returning error ORA-16191
            It may be necessary to define the DB_ALLOWED_LOGON_VERSION
            initialization parameter to the value "10". Check the
            manual for information on this initialization parameter.
            ------------------------------------------------------------
            Mon Apr 30 21:37:25 2012
            Errors in file /data/u01/app/oracle/admin/ORADB/bdump/oradb_arc1_3233.trc:
            ORA-16191: Primary log shipping client not logged on standby
            PING[ARC1]: Heartbeat failed to connect to standby 'STANDBY'. Error is 16191.

            Regards,

            007
            • 3. Re: Automatic shipping of Archive log
              mseberg
              Hello;

              Check that the primary and standby are using a password file and remote_login_passwordfile is set to SHARED or EXCLUSIVE, and that the SYS password is same in the password files.

              In Oracle 11 you have to Copy the password orapw[SID] from primary to standby and then stop redo apply shutdown the database and restart the database using the new password file.

              DB_ALLOWED_LOGON_VERSION

              Note: Bug 2981553, which is implemented in 10.1.0.2, removes the parameter db_allowed_logon_version. This is replaced by the sqlnet.ora parameter called sqlnet_allowed_logon_version.

              SQLNET_ALLOWED_LOGON_VERSIONS=
              Allowed Values
              
              10 for Oracle Database 10g authentication protocols
              
              9 for Oracle9i authentication protocols
              
              8 for Oracle8 authentication protocols
              
              7.3 for Oracle 7.3 authentication protocols
              http://docs.oracle.com/cd/B19306_01/network.102/b14213/sqlnet.htm

              Best Regards

              mseberg

              Edited by: mseberg on Apr 30, 2012 11:23 AM


              Exactly what part of my answer was not helpful or incorrect?

              Edited by: mseberg on Apr 30, 2012 1:15 PM
              • 4. Re: Automatic shipping of Archive log
                007
                Hi mseberg,

                Thanks for your reply. Now in 10.2.0.1 whats the solution?? do i need to use the same password file both in primary and standby database which will solve the problem??

                Regards,

                007
                • 5. Re: Automatic shipping of Archive log
                  mseberg
                  remote_login_passwordfile is set to SHARED or EXCLUSIVE on Both ( in the SPFILE )

                  Password file from primary moved and rename on Standby

                  Example

                  /u01/app/oracle/product/10.2.0.2/dbs/orapwPRIMARY ( your Primary name make differ as expected )

                  Would become on the standby

                  /u01/app/oracle/product/10.2.0.2/dbs/orapwSTANDBY ( your Standby name may differ as expected )


                  Cancel the apply

                  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

                  Shutdown the database

                  SHUTDOWN

                  And restart using the new password file

                  STARTUP MOUNT

                  restart apply

                  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION

                  ( would still keep DB_ALLOWED_LOGON_VERSION in mind if you use it )


                  Best Regards

                  mseberg
                  • 6. Re: Automatic shipping of Archive log
                    Shivananda Rao
                    Hi,
                    ORA-16191: Primary log shipping client not logged on standby
                    Cause: An attempt to ship redo to standby without logging on to standby or with invalid user credentials.

                    Action: Check that primary and standby are using password files and that both primary and standby have the same SYS password. Restart primary and/or standby after ensuring that password file is accessible and REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to SHARED or EXCLUSIVE.
                    Mseberg has provided you with the solution. Copy the Password file of the primary database to the standby server and rename it to the format "orapw<STANDBY-SID>"
                    • 7. Re: Automatic shipping of Archive log
                      CKPT
                      Sorry for the late response.

                      post from primary & standby as

                      SQL> select * from v$pwfile_users;

                      also post from primary & standby

                      $ls -ltr $ORACLE_HOME/dbs/orapw*
                      • 8. Re: Automatic shipping of Archive log
                        Seberg
                        So Shivananda Rao gets the correct answer and the points for telling you that somebody else's answer is correct?

                        How does this work?

                        Seems to me your sense of fair play is messed up. Maybe you know user 805683


                        Cooper
                        • 9. Re: Automatic shipping of Archive log
                          808686
                          Seems to me your sense of fair play is messed up. Maybe you know user 805683
                          Cooper,

                          Could you please let me know why am I being dragged into this ? If OP has rewarded the wrong person, then post your reply to OP and to the wrong person rather than getting me into picture.
                          • 10. Re: Automatic shipping of Archive log
                            Seberg
                            Right.

                            Shivananda.

                            Right.
                            • 11. Re: Automatic shipping of Archive log
                              Shivananda Rao
                              Hello,

                              This seems to be completely wrong. Please reward Mseberg as he was the one who had provided the correct answer.

                              Unnecessarily I am be pointed out here. Also I would make it clear that I am here only to share and gain knowledge and do not post for the sake of points.

                              *@Mseberg:*

                              I am upset for the OP not rewarding the right person. Intention of my post was to tell OP that he has got the right answer from you and to implement it and also to let him know what exactly the error is. I apologize for my post...

                              Edited by: Shivananda Rao on May 1, 2012 11:37 AM
                              • 12. Re: Automatic shipping of Archive log
                                Seberg
                                Thanks for stepping up and trying to do the right thing.

                                Cooper