ORA-16191: Primary log shippingclient not logged onstandby
ARCHIVE LOG NOT SHIPPED TO DR DATABASE
Check the status of archive log shipping status to standby.
Run the command in standby database
. oraenv
+ASM
Asmcmd>cd fra/sbyweb/archivelog
Asmcmd>ls
( It will show the archive log shipped)
IN PRIMARY DATABASE
Run the following command
[oracle@caoweb1]$ !sql
SQL> select dest_name, error from v$archive_dest_status;
coldest_name for a30
col error for a30
( The error is regarding the password file mismatch between the primary and standby database)
DEST_NAME ERROR
—————————— ——————————
LOG_ARCHIVE_DEST_2 ORA-16191: Primary log shippingclient not logged onstandby
SOLUTION:
[oracle@caoweb1]$ !sql
SQL> alter system set log_archive_dest_state_2=’DEFER’ scope=both;
System altered.
SQL>sho parameter log_archive_dest_state_2;
Copy the amended password file to standby(DR) database and another node of the primary database.
[oracle@caoweb1 ~]$ cd /u01/app/oracle/product/11g/dbs/
[oracle@caoweb1 dbs]$ scp -r orapwcaoweb1 157.60.2.35:/u01/app/oracle/product/11g/dbs/.
[oracle@caoweb1 dbs]$ scp -r orapwcaoweb1 caoweb2:/u01/app/oracle/product/11g/dbs/.
[oracle@caoweb1 dbs]$ ssh caoweb2
Take the backup of previous password file
[oracle@caoweb2 dbs]$ mv orapwcaoweb2 orapwcaoweb2_bak
Rename the copied password file accordingly
[oracle@caoweb2 dbs]$ mv orapwcaoweb1 orapwcaoweb2
[oracle@caoweb1 dbs]$ sshsbyweb
[oracle@sbyweb ~]$ cd /u01/app/oracle/product/11g/dbs/
Take the backup of previous password file
[oracle@sbywebdbs]$ mvorapwsbyweborapwsbyweb_bak
Rename the copied password file accordingly
[oracle@sbywebdbs]$ mv orapwcaoweb1 orapwsbyweb
IN PRIMARY DATABASE:
[oracle@caoweb1]$ !sql
SQL> alter system set log_archive_dest_state_2=’enable’ scope=both;
System altered.
SQL>sho parameter log_archive_dest_state_2;
Check the error against LOG_ARCHIVE_DEST_2(no error must be there)
SQL> select dest_name, error from v$archive_dest_status;
coldest_name for a30
col error for a30
[oracle@caoweb1 ]$ ssh sbyweb
[oracle@sbyweb ]$!sql
SQL>recover managed standby database cancel;
Media recovery complete.
SQL>shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>startup mount
ORACLE instance started.
Total System Global Area 5010685952 bytes
Fixed Size 2212936 bytes
Variable Size 2751466424 bytes
Database Buffers 2214592512 bytes
Redo Buffers 42414080 bytes
Database mounted.
SQL> ALTER DATABASE OPEN READ ONLY;
SQL>recover standby database;
AUTO
SQL>recover managed standby database disconnect from session;
Media recovery complete.
Manually Switch the log files from primary database(both Nodes)
[oracle@caoweb1 ]$!sql
SQL> alter system switch logfile;(run the command 5-6 times)
[oracle@caoweb1 ]$ssh caoweb2
[oracle@caoweb2 ]$!sql
SQL> alter system switch logfile;(run the command 5-6 times)
Check the log status applying in standby database
[oracle@caoweb1 ]$sshsbyweb
[oracle@sbyweb ]$!sql
SQL>
SELECT * FROM
(SELECT SEQUENCE#,FIRST_TIME,COMPLETION_TIME,APPLIED,STATUS,ARCHIVAL_THREAD#,NAME
FROM V$ARCHIVED_LOG WHERE APPLIED=’YES’
AND ARCHIVAL_THREAD#=1 AND SEQUENCE# IN
(SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG WHERE APPLIED=’YES’ AND ARCHIVAL_THREAD#=1)
UNION
SELECT SEQUENCE#,FIRST_TIME,COMPLETION_TIME,APPLIED,STATUS,ARCHIVAL_THREAD#,NAME
FROM V$ARCHIVED_LOG WHERE APPLIED=’YES’
AND ARCHIVAL_THREAD#=2 AND SEQUENCE# IN
(SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG WHERE APPLIED=’YES’ AND ARCHIVAL_THREAD#=2))
ORDER BY ARCHIVAL_THREAD#